diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 53473593d25b..9bd9bfe9cee2 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -4915,8 +4915,8 @@ get_interval_count(int *argcp, char **argv, float *iv, if (*end == '\0' && errno == 0) { if (interval == 0) { - (void) fprintf(stderr, gettext("interval " - "cannot be zero\n")); + (void) fprintf(stderr, gettext( + "interval cannot be zero\n")); usage(B_FALSE); } /* @@ -4946,8 +4946,8 @@ get_interval_count(int *argcp, char **argv, float *iv, if (*end == '\0' && errno == 0) { if (interval == 0) { - (void) fprintf(stderr, gettext("interval " - "cannot be zero\n")); + (void) fprintf(stderr, gettext( + "interval cannot be zero\n")); usage(B_FALSE); } diff --git a/lib/libzutil/zutil_nicenum.c b/lib/libzutil/zutil_nicenum.c index 306cec3caddf..1a19db0dfebc 100644 --- a/lib/libzutil/zutil_nicenum.c +++ b/lib/libzutil/zutil_nicenum.c @@ -35,6 +35,9 @@ boolean_t zfs_isnumber(const char *str) { + if (!*str) + return (B_FALSE); + for (; *str; str++) if (!(isdigit(*str) || (*str == '.'))) return (B_FALSE);