Просмотр исходного кода

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 лет назад: 15
Родитель
Сommit
65d2ed5c21
1 измененных файлов с 0 добавлено и 1 удалено
  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));