[CRIU] [PATCHv2 1/3] util: Introduce STREQ and STRNEQ macros

Dmitry Safonov 0x7f454c46 at gmail.com
Wed Jan 30 18:01:22 MSK 2019


On 1/29/19 2:46 PM, Cyrill Gorcunov wrote:
> On Tue, Jan 29, 2019 at 02:40:14PM +0000, Radostin Stoyanov wrote:
>>>> - v2: surround the macro-variables with parenthesis (Thanks to Mike Rapoport)
>>> Don't want to disappoint you, but you know strcmp is well known library
>>> function and I don't see any reason to add an additional layer of syntactic
>>> sugar here. I simply don't get how it improves readability. Up to
>>> Andrew though. Don't get it close this is just my opinion.
>> Thank you for the feedback. Well if it does not improve readability for
>> others, and only adds additional layer of syntactic sugar, then it would
>> be better not to introduce these macros.
> 
> Up to you guys, I'm not strongly against.

+1
not strongly against, but don't see the purpose of hiding strcmp().

Moreover, I believe while writing new code we can forget about existence
of this macro and in result we'll have both variants.

-- 
          Dima


More information about the CRIU mailing list