Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jun 2015 10:41:52 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Marcelo Araujo <araujo@FreeBSD.org>
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>
In-Reply-To: <201506040244.t542ibW9051338@svn.freebsd.org>
References:  <201506040244.t542ibW9051338@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150604074152.GZ2499>