Re: [PATCH] renice: correctly detect errors in arguments

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

 



On Sunday 13 January 2008, LaMont Jones wrote:
> +void usage(void)
> +{
> +	fprintf(stderr, _("usage: renice priority [ [ -p ] pids ] "
> +			  "[ [ -g ] pgrps ] [ [ -u ] users ]\n"));
> +	exit(1);
> +}

usage should take an integer for its exit status, otherwise `renice --help` 
incorrectly exits with 1

> +	prio = strtol(*argv,&endptr,10);

missing spaces between ,

> +	if (*endptr) {
> +		usage();
>  	}

no need for the braces

> +			who = strtol(*argv,&endptr,10);

missing spaces between ,
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[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