RE: [PATCH v2 2/5] ipset: add "inner" flag implementation

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

 



> -----Original Message-----
> From: netfilter-devel-owner@xxxxxxxxxxxxxxx [mailto:netfilter-devel-owner@xxxxxxxxxxxxxxx] On Behalf Of Dash Four
> Sent: Thursday, June 27, 2013 3:37 PM
> To: Jozsef Kadlecsik
> Cc: Pablo Neira Ayuso; Netfilter Core Team
> Subject: Re: [PATCH v2 2/5] ipset: add "inner" flag implementation
> 
...
> I disagree. By having "return false" (or "return 0", "return -1" and so
> on) instead of "goto err" it is not immediately apparent to someone who
> studies/reviews/uses the code that this is an error condition/path. I
> have been in that situation many times when I have to go back and look
> at a particular function call to see what "return false" or "return 0"
> actually means.
> 
> By including "goto err" instead of multiple "return false" statement,
> that makes it instantly obvious what the purpose of that statement is
> without having to look elsewhere.

I suppose as an alternative you could go way against the usual practice and put some text in a function header comment block indicating what the return code means. I know it doesn't get used much but C has had this /* comment */ thing for a long time. I've never understood why more people don't use it.

Jeff Haran

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux