Commit 738c8340 authored by Mike Frysinger's avatar Mike Frysinger

lib: af: constify herror message

This string is never modified, so constify it.
parent 61077c38
...@@ -143,7 +143,7 @@ static int AX25_input(int type, char *bufp, struct sockaddr *sap) ...@@ -143,7 +143,7 @@ static int AX25_input(int type, char *bufp, struct sockaddr *sap)
/* Display an error message. */ /* Display an error message. */
static void AX25_herror(char *text) static void AX25_herror(const char *text)
{ {
if (text == NULL) if (text == NULL)
fprintf(stderr, "%s\n", AX25_errmsg); fprintf(stderr, "%s\n", AX25_errmsg);
......
...@@ -231,7 +231,7 @@ static int INET_rresolve(char *name, size_t len, struct sockaddr_in *sin, ...@@ -231,7 +231,7 @@ static int INET_rresolve(char *name, size_t len, struct sockaddr_in *sin,
} }
static void INET_reserror(char *text) static void INET_reserror(const char *text)
{ {
herror(text); herror(text);
} }
......
...@@ -116,7 +116,7 @@ static int INET6_rresolve(char *name, size_t namelen, ...@@ -116,7 +116,7 @@ static int INET6_rresolve(char *name, size_t namelen,
} }
static void INET6_reserror(char *text) static void INET6_reserror(const char *text)
{ {
herror(text); herror(text);
} }
......
...@@ -41,7 +41,7 @@ struct aftype { ...@@ -41,7 +41,7 @@ struct aftype {
const char *(*print) (const char *); const char *(*print) (const char *);
const char *(*sprint) (struct sockaddr *, int numeric); const char *(*sprint) (struct sockaddr *, int numeric);
int (*input) (int type, char *bufp, struct sockaddr *); int (*input) (int type, char *bufp, struct sockaddr *);
void (*herror) (char *text); void (*herror) (const char *text);
int (*rprint) (int options); int (*rprint) (int options);
int (*rinput) (int typ, int ext, char **argv); int (*rinput) (int typ, int ext, char **argv);
......
...@@ -146,7 +146,7 @@ static int NETROM_input(int type, char *bufp, struct sockaddr *sap) ...@@ -146,7 +146,7 @@ static int NETROM_input(int type, char *bufp, struct sockaddr *sap)
/* Display an error message. */ /* Display an error message. */
static void NETROM_herror(char *text) static void NETROM_herror(const char *text)
{ {
if (text == NULL) if (text == NULL)
fprintf(stderr, "%s\n", netrom_errmsg); fprintf(stderr, "%s\n", netrom_errmsg);
......
...@@ -100,7 +100,7 @@ static int ROSE_input(int type, char *bufp, struct sockaddr *sap) ...@@ -100,7 +100,7 @@ static int ROSE_input(int type, char *bufp, struct sockaddr *sap)
/* Display an error message. */ /* Display an error message. */
static void ROSE_herror(char *text) static void ROSE_herror(const char *text)
{ {
if (text == NULL) if (text == NULL)
fprintf(stderr, "%s\n", ROSE_errmsg); fprintf(stderr, "%s\n", ROSE_errmsg);
......
...@@ -131,7 +131,7 @@ X25_input(int type, char *bufp, struct sockaddr *sap) ...@@ -131,7 +131,7 @@ X25_input(int type, char *bufp, struct sockaddr *sap)
/* Display an error message. */ /* Display an error message. */
static void static void
X25_herror(char *text) X25_herror(const char *text)
{ {
if (text == NULL) fprintf(stderr, "%s\n", X25_errmsg); if (text == NULL) fprintf(stderr, "%s\n", X25_errmsg);
else fprintf(stderr, "%s: %s\n", text, X25_errmsg); else fprintf(stderr, "%s: %s\n", text, X25_errmsg);
......
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