svn commit: r283974 - head/lib/libugidfw

Konstantin Belousov kostikbel at gmail.com
Thu Jun 4 07:41:59 UTC 2015


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",


More information about the svn-src-all mailing list