[GRASS-SVN] r57671 - grass/branches/releasebranch_6_4/raster/r.null

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 13 20:10:50 PDT 2013


Author: hamish
Date: 2013-09-13 20:10:50 -0700 (Fri, 13 Sep 2013)
New Revision: 57671

Modified:
   grass/branches/releasebranch_6_4/raster/r.null/null.c
Log:
int to boolean macros for readability (sync with devbr6, partial merge of r50234)

Modified: grass/branches/releasebranch_6_4/raster/r.null/null.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.null/null.c	2013-09-14 03:07:25 UTC (rev 57670)
+++ grass/branches/releasebranch_6_4/raster/r.null/null.c	2013-09-14 03:10:50 UTC (rev 57671)
@@ -33,7 +33,7 @@
     int row, col, null_fd;
     unsigned char *null_bits;
     RASTER_MAP_TYPE map_type;
-    int change_null = 0, create, remove, only_int, only_fp, only_null;
+    int change_null = FALSE, create, remove, only_int, only_fp, only_null;
     int is_reclass;
 
     struct GModule *module;
@@ -131,7 +131,7 @@
     
     if (parms.null->answer) {
 	if (sscanf(parms.null->answer, "%lf", &new_null) == 1)
-	    change_null = 1;
+	    change_null = TRUE;
 	else
 	    G_fatal_error(_("%s is illegal entry for null"),
 			  parms.null->answer);
@@ -177,8 +177,7 @@
 
 	for (row = 0; row < cellhd.rows; row++) {
 	    G_percent(row, cellhd.rows, 1);
-	    if (G__write_null_bits(null_fd, null_bits, row, cellhd.cols, 0) <
-		0)
+	    if (G__write_null_bits(null_fd, null_bits, row, cellhd.cols, 0) < 0)
 		G_fatal_error(_("Error writing null row %d"), row);
 	}
 	G_percent(row, cellhd.rows, 1);



More information about the grass-commit mailing list