diff options
author | Denis Vlasenko | 2007-01-29 22:51:58 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-01-29 22:51:58 +0000 |
commit | ab2aea44479fd6f519bccd651a37f30e792b7593 (patch) | |
tree | 443636e12ffb52db95168013bbda80f78ed49fe6 /networking/libiproute/rt_names.c | |
parent | 06c0a71d2315756db874e98bc4f760ca3283b6a6 (diff) | |
download | busybox-ab2aea44479fd6f519bccd651a37f30e792b7593.zip busybox-ab2aea44479fd6f519bccd651a37f30e792b7593.tar.gz |
preparatory patch for -Wwrite-strings #4
Diffstat (limited to 'networking/libiproute/rt_names.c')
-rw-r--r-- | networking/libiproute/rt_names.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/networking/libiproute/rt_names.c b/networking/libiproute/rt_names.c index 686326f..797c83b 100644 --- a/networking/libiproute/rt_names.c +++ b/networking/libiproute/rt_names.c @@ -13,7 +13,7 @@ #include "libbb.h" #include "rt_names.h" -static void rtnl_tab_initialize(char *file, const char **tab, int size) +static void rtnl_tab_initialize(const char *file, const char **tab, int size) { char buf[512]; FILE *fp; @@ -30,10 +30,11 @@ static void rtnl_tab_initialize(char *file, const char **tab, int size) p++; if (*p == '#' || *p == '\n' || *p == 0) continue; - if (sscanf(p, "0x%x %s\n", &id, namebuf) != 2 && - sscanf(p, "0x%x %s #", &id, namebuf) != 2 && - sscanf(p, "%d %s\n", &id, namebuf) != 2 && - sscanf(p, "%d %s #", &id, namebuf) != 2) { + if (sscanf(p, "0x%x %s\n", &id, namebuf) != 2 + && sscanf(p, "0x%x %s #", &id, namebuf) != 2 + && sscanf(p, "%d %s\n", &id, namebuf) != 2 + && sscanf(p, "%d %s #", &id, namebuf) != 2 + ) { bb_error_msg("database %s is corrupted at %s", file, p); return; |