Update of /cvsroot/monetdb/sql/src/storage
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20234

Modified Files:
      Tag: Aug2009
        sql_storage.h 
Log Message:
It's a good idea to *always* use parentheses around the use of
parameters in #defines.


U sql_storage.h
Index: sql_storage.h
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/sql_storage.h,v
retrieving revision 1.57.2.3
retrieving revision 1.57.2.4
diff -u -d -r1.57.2.3 -r1.57.2.4
--- sql_storage.h       20 Sep 2009 19:39:36 -0000      1.57.2.3
+++ sql_storage.h       9 Oct 2009 08:38:22 -0000       1.57.2.4
@@ -24,15 +24,15 @@
 
 #define COLSIZE        1024
 
-#define isNew(x)  (x->base.flag == TR_NEW)
-#define isTemp(x) (isNew(x->t)||x->t->persistence!=SQL_PERSIST)
-#define isTempTable(x)   (x->persistence!=SQL_PERSIST)
-#define isGlobalTable(x) (x->persistence!=SQL_LOCAL_TEMP && \
-                         x->persistence!=SQL_DECLARED_TABLE)
-#define isGlobalTemp(x)  (x->persistence==SQL_GLOBAL_TEMP)
-#define isTempSchema(x)  (strcmp(x->base.name, "tmp") == 0 || \
-                         strcmp(x->base.name, dt_schema) == 0)
-#define isDeclaredTable(x)  (x->persistence==SQL_DECLARED_TABLE)
+#define isNew(x)  ((x)->base.flag == TR_NEW)
+#define isTemp(x) (isNew((x)->t)||(x)->t->persistence!=SQL_PERSIST)
+#define isTempTable(x)   ((x)->persistence!=SQL_PERSIST)
+#define isGlobalTable(x) ((x)->persistence!=SQL_LOCAL_TEMP && \
+                         (x)->persistence!=SQL_DECLARED_TABLE)
+#define isGlobalTemp(x)  ((x)->persistence==SQL_GLOBAL_TEMP)
+#define isTempSchema(x)  (strcmp((x)->base.name, "tmp") == 0 || \
+                         strcmp((x)->base.name, dt_schema) == 0)
+#define isDeclaredTable(x)  ((x)->persistence==SQL_DECLARED_TABLE)
 
 typedef enum store_type {
        store_bat,      /* delta bats, ie multi user read/write */
@@ -42,7 +42,7 @@
        store_bpm       /* bat partition manager */
 } store_type;
 
-#define STORE_READONLY(st) (st == store_ro || st == store_suro)
+#define STORE_READONLY(st) ((st) == store_ro || (st) == store_suro)
 
 extern sql_trans *gtrans;
 extern int store_nr_active;


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to