Преглед изворни кода

dpkg: Remove redundant trailing newlines from debug output

debug() already prints a trailing newline, so there's no point in
including it in the string to be printed.
Guillem Jover пре 16 година
родитељ
комит
88b5c91de1
3 измењених фајлова са 5 додато и 5 уклоњено
  1. 1 1
      src/depcon.c
  2. 2 2
      src/processarc.c
  3. 2 2
      src/remove.c

+ 1 - 1
src/depcon.c

@@ -86,7 +86,7 @@ foundcyclebroken(struct cyclesofarlink *thislink, struct cyclesofarlink *sofar,
    * occurrence of the current package in the list.
    */
   sol->possi->cyclebreak = true;
-  debug(dbg_depcon,"cycle broken at %s -> %s\n",
+  debug(dbg_depcon, "cycle broken at %s -> %s",
         sol->possi->up->up->name, sol->possi->ed->name);
   return true;
 }

+ 2 - 2
src/processarc.c

@@ -1182,13 +1182,13 @@ void process_archive(const char *filename) {
     }
     iter = filepackages_iter_new(cfile->namenode);
     while ((otherpkg = filepackages_iter_next(iter))) {
-      debug(dbg_eachfiledetail, "process_archive ... found in %s\n", otherpkg->name);
+      debug(dbg_eachfiledetail, "process_archive ... found in %s", otherpkg->name);
       /* If !fileslistvalid then it's one of the disappeared packages above
        * and we don't bother with it here, clearly. */
       if (otherpkg == pkg || !otherpkg->clientdata->fileslistvalid)
         continue;
       if (otherpkg == divpkg) {
-        debug(dbg_eachfiledetail, "process_archive ... diverted, skipping\n");
+        debug(dbg_eachfiledetail, "process_archive ... diverted, skipping");
         continue;
       }
 

+ 2 - 2
src/remove.c

@@ -60,7 +60,7 @@ static void checkforremoval(struct pkginfo *pkgtoremove,
           depender->status == stat_triggersawaited))
       continue;
     if (ignore_depends(depender)) {
-      debug(dbg_depcon,"ignoring depending package `%s'\n",depender->name);
+      debug(dbg_depcon, "ignoring depending package '%s'", depender->name);
       continue;
     }
     if (dependtry > 1) { if (findbreakcycle(pkgtoremove)) sincenothing= 0; }
@@ -416,7 +416,7 @@ static void removal_bulk_remove_configfiles(struct pkginfo *pkg) {
                  (searchfile->namenode->divert->camefrom ||
                   (searchfile->namenode->divert->useinstead &&
                    searchfile->namenode->divert->pkg != pkg))) {
-        debug(dbg_conff,"removal_bulk conffile `%s' ignored due to diversion\n",
+        debug(dbg_conff, "removal_bulk conffile '%s' ignored due to diversion",
               conff->name);
         *lconffp= conff->next;
       } else {