[PATCH] xkbcomp: Improved -w option parsing

Vincent Lefevre vincent at vinc17.net
Thu Aug 7 00:44:39 PDT 2014


On 2014-08-07 15:46:51 +1000, Peter Hutterer wrote:
> whoah, this is pretty much a perfect example of how not to use goto...
> adding three lines for error and exist isn't that hard, jumping from one
> random spot into another random spot is not ok.

This is a matter of taste. I've always disliked source code duplication
in particular for the same task: when tracing, one too easily look
at the wrong place, and when the code needs to be changed, it can
too easily become inconsistent (e.g. one fixes an issue at one place
and forgets the other ones).

Note also that parseutils.c already has a similar use of goto.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the xorg-devel mailing list