On Sun, May 13, 2018 at 03:22:39PM +0200, Sebastian Benoit wrote: > Here is a better version that moves the RT_TABLEID_MAX check into the > rdomain_check() function.
I think hiding the yyerror() in rdomain_check() is not so nice. So I like your first version more. Could it be fixed with an "else if"? if ($2 < 0 || $2 > RT_TABLEID_MAX) yyerror("rdomain %lld outside range", $2); ELSE if (rdomain_exists($2) != 1) yyerror("rdomain %lld does not exist", $2); > still ok? Your version is also correct and other functions also call yyerror(). So although I don't like it, OK bluhm@ > + if (errno == ENOENT) > + /* table nonexistent */ > + goto notfound; Could you put braces around this if block? Although not necessary as one line is a comment, an if with a two lines block looks odd. bluhm