[GRASS-SVN] r34747 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 6 04:04:17 EST 2008


Author: glynn
Date: 2008-12-06 04:04:16 -0500 (Sat, 06 Dec 2008)
New Revision: 34747

Modified:
   grass/trunk/lib/gis/null_val.c
Log:
Fix bug in G_is_c_null_value()


Modified: grass/trunk/lib/gis/null_val.c
===================================================================
--- grass/trunk/lib/gis/null_val.c	2008-12-06 04:33:51 UTC (rev 34746)
+++ grass/trunk/lib/gis/null_val.c	2008-12-06 09:04:16 UTC (rev 34747)
@@ -240,14 +240,8 @@
 
 int G_is_c_null_value(const CELL * cellVal)
 {
-    int i;			/* counter */
-
     /* Check if the CELL value matches the null pattern */
-    for (i = 0; i < sizeof(CELL); i++)
-	if (cellVal[i] != (CELL) 0x80000000)
-	    return FALSE;
-
-    return TRUE;
+    return *cellVal == (CELL) 0x80000000;
 }
 
 /****************************************************************************



More information about the grass-commit mailing list