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

dpkg: Use line instead of desc to make use of the strtok() assignment

There's no actual behavior change with this, but it makes the code
clearer and squashes a warning.

Warned-by: clang static analyzer
Guillem Jover лет назад: 12
Родитель
Сommit
20f855ab44
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/main.c

+ 1 - 1
src/main.c

@@ -576,7 +576,7 @@ print_forceinfo(const struct forceinfo *fi)
   desc = m_strdup(gettext(fi->desc));
 
   line = strtok(desc, "\n");
-  print_forceinfo_line(fi->type, fi->name, desc);
+  print_forceinfo_line(fi->type, fi->name, line);
   while ((line = strtok(NULL, "\n")))
     print_forceinfo_line(' ', "", line);