]> granicus.if.org Git - postgresql/commitdiff
Tweak new PQExpBufferBroken macro to suppress warnings from pickier
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 26 Nov 2008 16:23:11 +0000 (16:23 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 26 Nov 2008 16:23:11 +0000 (16:23 +0000)
versions of gcc.

src/interfaces/libpq/pqexpbuffer.h

index 3acca24b56967dfa740230ef8fde3eea3bdd0e4c..8e7a907d0b3be68ce011064a37e84009676a0e0b 100644 (file)
@@ -18,7 +18,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/interfaces/libpq/pqexpbuffer.h,v 1.20 2008/11/26 00:26:23 tgl Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/pqexpbuffer.h,v 1.21 2008/11/26 16:23:11 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -57,7 +57,7 @@ typedef PQExpBufferData *PQExpBuffer;
  *------------------------
  */
 #define PQExpBufferBroken(str)  \
-       (!(str) || (str)->maxlen == 0)
+       ((str) == NULL || (str)->maxlen == 0)
 
 /*------------------------
  * Initial size of the data buffer in a PQExpBuffer.