浏览代码

lib/imagery: Fix file size check (#1274)

Fixes -Wtautological-compare compiler warning.

Co-authored-by: Markus Metz <markus.metz.giswork@gmail.com>
nila 4 年之前
父节点
当前提交
c47f2c159a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/imagery/iscatt_core.c

+ 1 - 1
lib/imagery/iscatt_core.c

@@ -526,7 +526,7 @@ static int compute_scatts_from_chunk_row(struct scCats *scatt_conds,
 			      ("Unable to read from category raster condition file."));
 		    return -1;
 		}
-		if (n_pixs != n_pixs) {
+		if (n_pixs != (row_size) / sizeof(unsigned char)) {
 		    G_free(rast_pixs);
 		    G_free(belongs_pix);
 		    G_warning(_