Re: Memo on coding practices: strcmp() does not yield bool

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Memo on coding practices: strcmp() does not yield bool
Date: 2000-07-07 06:07:01
Message-ID: 39657385.C7209972@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

My experience has been the same as Tom's (only perhaps more so, he
didn't actually admit to being confused by "if (strcmp(...))" :)

I've always been uncomfortable with that "implicit zero", and have been
confused more than once by code which does not include the "= 0" or "!=
0". When I'm modifying code, I usually will add this stuff in.

- Thomas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Malcontent 2000-07-07 06:19:52 FYI
Previous Message Thomas Lockhart 2000-07-07 05:58:53 Re: DateStyle (was Re: Per-database/schema settings)