Explorar o código

u-a: Do not unneedingly initialize variables to NULL

Those get initialized unconditionally later on in the code.

This was spotted by a run with the clang static analyzer.
Guillem Jover %!s(int64=15) %!d(string=hai) anos
pai
achega
65d2ed5c21
Modificáronse 1 ficheiros con 0 adicións e 1 borrados
  1. 0 1
      utils/update-alternatives.c

+ 0 - 1
utils/update-alternatives.c

@@ -1899,7 +1899,6 @@ alternative_set_selections(struct alternative_map *all, FILE* input, const char
 		errno = 0;
 		/* Can't use scanf("%s %s %s") because choice can
 		 * contain a space */
-		name = status = choice = NULL;
 		res = fgets(line, sizeof(line), input);
 		if (res == NULL && errno) {
 			error(_("while reading %s: %s"), desc, strerror(errno));