]> granicus.if.org Git - postgresql/blobdiff - contrib/tsearch2/crc32.c
Reduce WAL activity for page splits:
[postgresql] / contrib / tsearch2 / crc32.c
index dc93db727c171b80024ce439cc10abfa4796bf47..2bccacc104a75dcb497c36388184f8dbf52094fc 100644 (file)
@@ -1,5 +1,7 @@
 /* Both POSIX and CRC32 checksums */
 
+/* $PostgreSQL: pgsql/contrib/tsearch2/crc32.c,v 1.3 2006/03/11 04:38:30 momjian Exp $ */
+
 #include <sys/types.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -13,7 +15,7 @@
  * Oroginal code  by Spencer Garrett <srg@quick.com>
  */
 
-#define _CRC32_(crc, ch)        (crc = (crc >> 8) ^ crc32tab[(crc ^ (ch)) & 0xff])
+#define _CRC32_(crc, ch)        ((crc) = ((crc) >> 8) ^ crc32tab[((crc) ^ (ch)) & 0xff])
 
 /* generated using the AUTODIN II polynomial
  *     x^32 + x^26 + x^23 + x^22 + x^16 +