瀏覽代碼

Add explicit braces to avoid dangling "else" (#1248)

Addresses -Wdangling-else compiler warning.
nilason 4 年之前
父節點
當前提交
7b1c476f6b
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      raster/r.surf.idw/ll.c

+ 2 - 1
raster/r.surf.idw/ll.c

@@ -66,11 +66,12 @@ int find_neighbors_LL(EW * ewptr, NEIGHBOR * nbr_head, SHORT row, SHORT col,
 	    else if (!replace_neighbor(Mptr, nbr_head, distance))
 	    else if (!replace_neighbor(Mptr, nbr_head, distance))
 		*active = FALSE;	/* curtail search in this direction */
 		*active = FALSE;	/* curtail search in this direction */
 
 
-	    if (*active)
+	    if (*active) {
 		if (westward)
 		if (westward)
 		    extend_west(ewptr);
 		    extend_west(ewptr);
 		else
 		else
 		    extend_east(ewptr);
 		    extend_east(ewptr);
+	    }
 	}
 	}
 
 
 	active = &ewptr->ealive;
 	active = &ewptr->ealive;