> -----Original Message----- > From: Roy T. Fielding > Sent: Dienstag, 19. Oktober 2010 21:21 > To: [email protected] > Subject: Re: [PATCH] How to Use strcmp to Check for Equality > Without Confusing Your Fellow Code, Or: Isn't There a Macro for That? > > On Oct 19, 2010, at 9:36 AM, Malte S. Stretz wrote: > > And there are a lot of string compares in the Apache > codebase. Everytime > > you see a strcmp, you (or is it only me?) have to stop and > think "well, is > > this branch checking for equality or the opposite?" > > > > I think this is a case where either a coding standard could > help, or some > > helper macros in APR. I went for the latter and defined > APR_EQ plus > > variants in apr_string.h. See attached patch. > > Maybe a standard would help. More macros would not -- that > pain would be > far worse than the current inconsistency. -1 (design > opinion, not veto)
I agree with that. Regards Rüdiger
