From owner-svn-src-all@FreeBSD.ORG Thu Jun 4 07:41:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 892A997C; Thu, 4 Jun 2015 07:41:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3C921F00; Thu, 4 Jun 2015 07:41:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t547frWP045983 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 4 Jun 2015 10:41:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t547frWP045983 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t547fqwT045982; Thu, 4 Jun 2015 10:41:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 4 Jun 2015 10:41:52 +0300 From: Konstantin Belousov To: Marcelo Araujo Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283974 - head/lib/libugidfw Message-ID: <20150604074152.GZ2499@kib.kiev.ua> References: <201506040244.t542ibW9051338@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201506040244.t542ibW9051338@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 04 Jun 2015 07:41:59 -0000 On Thu, Jun 04, 2015 at 02:44:37AM +0000, Marcelo Araujo wrote: > Author: araujo (ports committer) > Date: Thu Jun 4 02:44:37 2015 > New Revision: 283974 > URL: https://svnweb.freebsd.org/changeset/base/283974 > > Log: > Remove unused variables and silence clang warnings. > > Differential Revision: D2686 > Reviewed by: rodrigc > > Modified: > head/lib/libugidfw/ugidfw.c > > @@ -1216,7 +1215,7 @@ bsde_delete_rule(int rulenum, size_t buf > { > struct mac_bsdextended_rule rule; > int name[10]; > - size_t len, size; > + size_t len; > int error; > > if (bsde_check_version(buflen, errstr) != 0) > @@ -1233,7 +1232,6 @@ bsde_delete_rule(int rulenum, size_t buf > name[len] = rulenum; > len++; > > - size = sizeof(rule); > error = sysctl(name, len, NULL, NULL, &rule, 0); This is very strange chunk. I suspect that the intent was to have 'size' as the sixth argument to the sysctl(3) call, or just have sizeof(rule) instead of 0. > if (error) { > len = snprintf(errstr, buflen, "%s.%d: %s", MIB ".rules",