Re: [PATCH 1/11] mesg: Use EXIT_* and discard K&R style declaration.

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

 



On Wed, Dec 01, 2010 at 05:17:16PM +0100, Marek Polacek wrote:
> Signed-off-by: Marek Polacek <mmpolacek@xxxxxxxxx>
> ---
>  login-utils/mesg.c |   47 +++++++++++++++++++++++------------------------
>  1 files changed, 23 insertions(+), 24 deletions(-)

 Applied, thanks.

> +int main(int argc, char *argv[])

 [...]

> +	if (!*argv) {
>  		if (sb.st_mode & (S_IWGRP | S_IWOTH)) {
> -			(void)fprintf(stdout, _("is y\n"));
> -			exit(0);
> +			puts(_("is y"));
> +			exit(EXIT_SUCCESS);
>  		}
> -		(void)fprintf(stdout, _("is n\n"));
> -		exit(1);
> +		puts(_("is n"));
> +		exit(EXIT_FAILURE);
>  	}

 Please, use "return EXIT_FAILURE" within main() rather than exit()
 next time.

    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