diff options
author | pjd <pjd@FreeBSD.org> | 2010-09-14 20:54:22 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-09-14 20:54:22 +0000 |
commit | fe072f18cf166e380d273e5c6e2e9f0b4a34ee6e (patch) | |
tree | 267ab7fd26c2337b1539cf5aafbc6e6d040306a6 /sbin/geom/core | |
parent | 774af0eb5d213ce0bd19a4b81b254a145b942dd3 (diff) | |
download | FreeBSD-src-fe072f18cf166e380d273e5c6e2e9f0b4a34ee6e.zip FreeBSD-src-fe072f18cf166e380d273e5c6e2e9f0b4a34ee6e.tar.gz |
Remove dead code.
Diffstat (limited to 'sbin/geom/core')
-rw-r--r-- | sbin/geom/core/geom.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index fae74a6..0a583ef 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -264,21 +264,12 @@ set_option(struct gctl_req *req, struct g_option *opt, const char *val) err(EXIT_FAILURE, "Invalid value for '%c' argument", opt->go_char); } - if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { - ptr = malloc(sizeof(intmax_t)); - if (ptr == NULL) - errx(EXIT_FAILURE, "No memory."); - *(intmax_t *)ptr = number; - opt->go_val = ptr; - gctl_ro_param(req, optname, sizeof(intmax_t), - opt->go_val); - } else { - asprintf((void *)(&ptr), "%jd", number); - if (ptr == NULL) - errx(EXIT_FAILURE, "No memory."); - opt->go_val = ptr; - gctl_ro_param(req, optname, -1, opt->go_val); - } + ptr = malloc(sizeof(intmax_t)); + if (ptr == NULL) + errx(EXIT_FAILURE, "No memory."); + *(intmax_t *)ptr = number; + opt->go_val = ptr; + gctl_ro_param(req, optname, sizeof(intmax_t), opt->go_val); } else if (G_OPT_TYPE(opt) == G_TYPE_STRING) { gctl_ro_param(req, optname, -1, val); } else if (G_OPT_TYPE(opt) == G_TYPE_BOOL) { |