Re: [PATCH 21/34] mesg: assigned value is never read [clang-analyzer]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 07, 2013 at 08:54:36PM +0100, Sami Kerola wrote:
> Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
> ---
>  term-utils/mesg.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/term-utils/mesg.c b/term-utils/mesg.c
> index 430236f..638a8c7 100644
> --- a/term-utils/mesg.c
> +++ b/term-utils/mesg.c
> @@ -115,7 +115,6 @@ int main(int argc, char *argv[])
>  			usage(stderr);
>  		}
>  
> -	argc -= optind;
>  	argv += optind;

 This is technically correct change, but I don't think it makes code
 more robust. The argv[] and argc are twins and it's bad coding style
 manner to divide the relation.

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux