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

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

 



Karel Zak wrote:

> On Tue, Oct 11, 2011 at 09:07:15AM +0200, Voelker, Bernhard wrote:
> > > +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.


> BTW, now you know why I don't like free-before-exit in simple utils
> like mountpoint(1). It makes code less readable and needlessly
> complicated.

no worries. I'm okay with it if you are. ;-)

Re free-before-exit: the problem is in tools like valgrind.
I'm not much into it, but don't they know about 'noreturn'?

Have a nice day,
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