| Message view | « Date » · « Thread » |
|---|---|
| Top | « Date » · « Thread » |
| From | Michael Wallner <m...@iworks.at> |
| Subject | Re: [PATCH] How to Use strcmp to Check for Equality Without Confusing Your Fellow Code, Or: Isn't There a Macro for That? |
| Date | Wed, 20 Oct 2010 07:23:27 GMT |
On 10/19/2010 06:36 PM, Malte S. Stretz wrote: > Hi folks, ... > 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?" ... > [1]http://c-faq.com/style/strcmp.html I think this is merely a matter of your point of view. How about reading it as "if strings do not differ"? You might sleep better at night ;) Cheers, Mike | |
| Mime |
|
| View raw message | |