aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/zpool/zpool_main.c8
-rw-r--r--lib/libzutil/zutil_nicenum.c3
2 files changed, 7 insertions, 4 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 7a15c78d1..81bbf1375 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 306cec3ca..1a19db0df 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);