diff options
author | phk <phk@FreeBSD.org> | 2005-01-17 07:14:24 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-01-17 07:14:24 +0000 |
commit | 63a9efe25ce06fd299e33aba75e3dd445d67484c (patch) | |
tree | d6047e24be75805bb9b475cab296fc30ee3e10f9 | |
parent | a4904eeb90300f98813b6ffbe307dde50c97a5f2 (diff) | |
download | FreeBSD-src-63a9efe25ce06fd299e33aba75e3dd445d67484c.zip FreeBSD-src-63a9efe25ce06fd299e33aba75e3dd445d67484c.tar.gz |
Discontinue zero-length g_ctl arguments as "just give him this pointer"
transfers. The necessary context for calling copyin() isn't available
anyway and automatic code-validation chokes on this.
-rw-r--r-- | sys/geom/geom_ctl.c | 7 |
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; |