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

u-a: Use xreadlink() instead of areadlink() in alternative_evolve()

The function does not expect the readlink call to fail.
Guillem Jover лет назад: 15
Родитель
Сommit
6c481e19a5
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      utils/update-alternatives.c

+ 1 - 1
utils/update-alternatives.c

@@ -2075,7 +2075,7 @@ alternative_evolve(struct alternative *a, struct alternative *b,
 			char *lnk;
 
 			xasprintf(&lnk, "%s/%s", altdir, sl->name);
-			new_file = areadlink(lnk);
+			new_file = xreadlink(lnk);
 			free(lnk);
 		}
 		if (strcmp(old, new) != 0 && lstat(old, &st) == 0 &&