Explorar el Código

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

Addresses -Wdangling-else compiler warning.
nilason hace 4 años
padre
commit
7b1c476f6b
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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))
 		*active = FALSE;	/* curtail search in this direction */
 
-	    if (*active)
+	    if (*active) {
 		if (westward)
 		    extend_west(ewptr);
 		else
 		    extend_east(ewptr);
+	    }
 	}
 
 	active = &ewptr->ealive;