summaryrefslogtreecommitdiffstats
path: root/sbin/geom/core/geom.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/geom/core/geom.c')
-rw-r--r--sbin/geom/core/geom.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c
index 472c659..cfa1e60 100644
--- a/sbin/geom/core/geom.c
+++ b/sbin/geom/core/geom.c
@@ -224,9 +224,7 @@ set_option(struct gctl_req *req, struct g_option *opt, const char *val)
if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) {
intmax_t number;
- errno = 0;
- number = strtoimax(val, NULL, 0);
- if (errno != 0) {
+ if (expand_number(val, &number) == -1) {
err(EXIT_FAILURE, "Invalid value for '%c' argument.",
opt->go_char);
}
OpenPOWER on IntegriCloud