Commit 9f5becc0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

FlexeLinting

parent 65d96284
...@@ -161,7 +161,7 @@ tweak_generic_double(struct cli *cli, const struct parspec *par, ...@@ -161,7 +161,7 @@ tweak_generic_double(struct cli *cli, const struct parspec *par,
if (arg != NULL) { if (arg != NULL) {
p = NULL; p = NULL;
u = strtod(arg, &p); u = strtod(arg, &p);
if (arg == '\0' || *p != '\0') { if (*p != '\0') {
VCLI_Out(cli, VCLI_Out(cli,
"Not a number (%s)\n", arg); "Not a number (%s)\n", arg);
VCLI_SetResult(cli, CLIS_PARAM); VCLI_SetResult(cli, CLIS_PARAM);
...@@ -241,12 +241,13 @@ tweak_generic_uint(struct cli *cli, volatile unsigned *dest, const char *arg, ...@@ -241,12 +241,13 @@ tweak_generic_uint(struct cli *cli, volatile unsigned *dest, const char *arg,
p = NULL; p = NULL;
if (!strcasecmp(arg, "unlimited")) if (!strcasecmp(arg, "unlimited"))
u = UINT_MAX; u = UINT_MAX;
else else {
u = strtoul(arg, &p, 0); u = strtoul(arg, &p, 0);
if (*arg == '\0' || *p != '\0') { if (*arg == '\0' || *p != '\0') {
VCLI_Out(cli, "Not a number (%s)\n", arg); VCLI_Out(cli, "Not a number (%s)\n", arg);
VCLI_SetResult(cli, CLIS_PARAM); VCLI_SetResult(cli, CLIS_PARAM);
return (-1); return (-1);
}
} }
if (u < min) { if (u < min) {
VCLI_Out(cli, "Must be at least %u\n", min); VCLI_Out(cli, "Must be at least %u\n", min);
......
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