diff options
Diffstat (limited to 'networking/libiproute/utils.c')
-rw-r--r-- | networking/libiproute/utils.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c index 5e06656f6..591c8933a 100644 --- a/networking/libiproute/utils.c +++ b/networking/libiproute/utils.c | |||
@@ -178,7 +178,7 @@ int get_prefix_1(inet_prefix * dst, char *arg, int family) | |||
178 | 178 | ||
179 | slash = strchr(arg, '/'); | 179 | slash = strchr(arg, '/'); |
180 | if (slash) | 180 | if (slash) |
181 | *slash = 0; | 181 | *slash = '\0'; |
182 | err = get_addr_1(dst, arg, family); | 182 | err = get_addr_1(dst, arg, family); |
183 | if (err == 0) { | 183 | if (err == 0) { |
184 | switch (dst->family) { | 184 | switch (dst->family) { |
@@ -237,26 +237,22 @@ uint32_t get_addr32(char *name) | |||
237 | 237 | ||
238 | void incomplete_command(void) | 238 | void incomplete_command(void) |
239 | { | 239 | { |
240 | bb_error_msg("command line is not complete, try option \"help\""); | 240 | bb_error_msg_and_die("command line is not complete, try option \"help\""); |
241 | exit(-1); | ||
242 | } | 241 | } |
243 | 242 | ||
244 | void invarg(const char * const arg, const char * const opt) | 243 | void invarg(const char *arg, const char *opt) |
245 | { | 244 | { |
246 | bb_error_msg(bb_msg_invalid_arg, arg, opt); | 245 | bb_error_msg_and_die(bb_msg_invalid_arg, arg, opt); |
247 | exit(-1); | ||
248 | } | 246 | } |
249 | 247 | ||
250 | void duparg(char *key, char *arg) | 248 | void duparg(const char *key, const char *arg) |
251 | { | 249 | { |
252 | bb_error_msg("duplicate \"%s\": \"%s\" is the second value", key, arg); | 250 | bb_error_msg_and_die("duplicate \"%s\": \"%s\" is the second value", key, arg); |
253 | exit(-1); | ||
254 | } | 251 | } |
255 | 252 | ||
256 | void duparg2(char *key, char *arg) | 253 | void duparg2(const char *key, const char *arg) |
257 | { | 254 | { |
258 | bb_error_msg("either \"%s\" is duplicate, or \"%s\" is garbage", key, arg); | 255 | bb_error_msg_and_die("either \"%s\" is duplicate, or \"%s\" is garbage", key, arg); |
259 | exit(-1); | ||
260 | } | 256 | } |
261 | 257 | ||
262 | int matches(const char *cmd, const char *pattern) | 258 | int matches(const char *cmd, const char *pattern) |