Author: pjd
Date: Tue Sep 14 20:54:22 2010
New Revision: 212622
URL: http://svn.freebsd.org/changeset/base/212622

Log:
  Remove dead code.

Modified:
  head/sbin/geom/core/geom.c

Modified: head/sbin/geom/core/geom.c
==============================================================================
--- head/sbin/geom/core/geom.c  Tue Sep 14 20:41:06 2010        (r212621)
+++ head/sbin/geom/core/geom.c  Tue Sep 14 20:54:22 2010        (r212622)
@@ -264,21 +264,12 @@ set_option(struct gctl_req *req, struct 
                        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) {
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to