diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 7a15c78d10bb..81bbf1375d0c 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -4965,8 +4965,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); } /* @@ -4996,8 +4996,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);