RE: [PATCH 1/2] mountpoint: refactor exit path

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

 



Dave Reisner wrote:

> +		else if (!quiet) {
>  			printf(_("%s is a mountpoint\n"), spec);
> +			rc = EXIT_SUCCESS;
> +		}

So mountpoint will never return SUCCESS if -q is used?
 
> -	return rc ? EXIT_FAILURE : EXIT_SUCCESS;
> +finish:
> +	return rc;

IMHO 'goto' is ugly and should only be used in more difficult
cases. In this case - if you really liked to avoid several
free(spec) statements - it could be easily done with a few
else statements.

Berny--
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