Commit 2e15dacb authored by Mike Frysinger's avatar Mike Frysinger

lib: af/hw: constify name fields

These strings are static data set in sub-modules and never modified.
parent 738c8340
...@@ -320,7 +320,7 @@ int aftrans_opt(const char *arg) ...@@ -320,7 +320,7 @@ int aftrans_opt(const char *arg)
/* type: 0=all, 1=getroute */ /* type: 0=all, 1=getroute */
void print_aflist(int type) { void print_aflist(int type) {
int count = 0; int count = 0;
char * txt; const char * txt;
struct aftype **afp; struct aftype **afp;
if (!sVafinit) if (!sVafinit)
......
...@@ -274,7 +274,7 @@ struct hwtype *get_hwntype(int type) ...@@ -274,7 +274,7 @@ struct hwtype *get_hwntype(int type)
/* type: 0=all, 1=ARPable */ /* type: 0=all, 1=ARPable */
void print_hwlist(int type) { void print_hwlist(int type) {
int count = 0; int count = 0;
char * txt; const char * txt;
struct hwtype **hwp; struct hwtype **hwp;
if (!sVhwinit) if (!sVhwinit)
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
/* This structure defines protocol families and their handlers. */ /* This structure defines protocol families and their handlers. */
struct aftype { struct aftype {
char *name; const char *name;
char *title; const char *title;
int af; int af;
int alen; int alen;
const char *(*print) (const char *); const char *(*print) (const char *);
...@@ -49,15 +49,15 @@ struct aftype { ...@@ -49,15 +49,15 @@ struct aftype {
int (*getmask) (char *src, struct sockaddr *mask, char *name); int (*getmask) (char *src, struct sockaddr *mask, char *name);
int fd; int fd;
char *flag_file; const char *flag_file;
}; };
extern struct aftype *aftypes[]; extern struct aftype *aftypes[];
/* This structure defines hardware protocols and their handlers. */ /* This structure defines hardware protocols and their handlers. */
struct hwtype { struct hwtype {
char *name; const char *name;
char *title; const char *title;
int type; int type;
int alen; int alen;
const char *(*print) (const char *); const char *(*print) (const char *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment