From owner-svn-src-all@FreeBSD.ORG Tue Sep 14 20:54:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 165341065693; Tue, 14 Sep 2010 20:54:23 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04BC58FC29; Tue, 14 Sep 2010 20:54:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8EKsMbD092466; Tue, 14 Sep 2010 20:54:22 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8EKsMPS092464; Tue, 14 Sep 2010 20:54:22 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009142054.o8EKsMPS092464@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 14 Sep 2010 20:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212622 - head/sbin/geom/core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 20:54:23 -0000 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) {