]> err.no Git - dpkg/commitdiff
Refactor returning code in deppossi_ok_found
authorIan Jackson <ian@davenant.greenend.org.uk>
Fri, 28 Mar 2008 16:19:25 +0000 (18:19 +0200)
committerGuillem Jover <guillem@debian.org>
Sun, 30 Mar 2008 09:46:43 +0000 (12:46 +0300)
ChangeLog
src/packages.c

index d0a91f81269002cd6f2af45555c32c3f2e0a7bbf..6aec5ce30e35cc837c6a45856efb4b0c8bbaf014 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-03-28  Ian Jackson  <ian@davenant.greenend.org.uk>
+
+       * src/packages.c (deppossi_ok_found): Refactor returning code.
+
 2008-03-28  Ian Jackson  <ian@davenant.greenend.org.uk>
 
        * src/depcon.c (depisok): Improve whynot message by stating when a
index e4016b6046988a1af774e8bf01cdad6c872058b5..8f1ebeee10603a351e260de38b791d1876d30bf5 100644 (file)
@@ -335,10 +335,8 @@ static int deppossi_ok_found(struct pkginfo *possdependee,
                     possdependee->name);
       }
 
-      if (fc_depends) thisf= (dependtry >= 4) ? 2 : 1;
-      debug(dbg_depcondetail,"      not configured/able - returning %d",thisf);
-      (*interestingwarnings)++;
-      return thisf;
+      debug(dbg_depcondetail, "      not configured/able");
+      goto unsuitable;
     }
   default:
     if (providing) {
@@ -350,11 +348,18 @@ static int deppossi_ok_found(struct pkginfo *possdependee,
                   possdependee->name);
     }
 
-    if (fc_depends) thisf= (dependtry >= 4) ? 2 : 1;
-    debug(dbg_depcondetail,"      not installed - returning %d",thisf);
-    (*interestingwarnings)++;
-    return thisf;
+    debug(dbg_depcondetail, "      not installed");
+    goto unsuitable;
   }
+
+unsuitable:
+  if (fc_depends)
+    thisf = (dependtry >= 4) ? 2 : 1;
+
+  debug(dbg_depcondetail, "        returning %d", thisf);
+  (*interestingwarnings)++;
+
+  return thisf;
 }
 
 static void breaks_check_one(struct varbuf *aemsgs, int *ok,