On Tue, Oct 11, 2011 at 09:55:43AM +0200, Voelker, Bernhard wrote: > 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. Yes if we want to use mountpoint(1) as a test (referential) application for libmount, otherwise it's better to keep so small utils simple and stupid. 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