summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/geom/geom_ctl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c
index b3e046f..51008a3 100644
--- a/sys/geom/geom_ctl.c
+++ b/sys/geom/geom_ctl.c
@@ -173,15 +173,10 @@ gctl_copyin(struct gctl_req *req)
}
ap[i].name = p;
ap[i].flag |= GCTL_PARAM_NAMEKERNEL;
- if (ap[i].len < 0) {
+ if (ap[i].len <= 0) {
error = gctl_error(req, "negative param length");
break;
}
- if (ap[i].len == 0) {
- ap[i].kvalue = ap[i].value;
- ap[i].flag |= GCTL_PARAM_VALUEKERNEL;
- continue;
- }
p = geom_alloc_copyin(req, ap[i].value, ap[i].len);
if (p == NULL)
break;
OpenPOWER on IntegriCloud