]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
order.c: Combine if's with identical conditions
authorChristoph Grüninger <foss@grueninger.de>
Wed, 14 May 2025 19:24:05 +0000 (21:24 +0200)
committerChristoph Grüninger <foss@grueninger.de>
Wed, 14 May 2025 19:24:05 +0000 (21:24 +0200)
Found by Cppcheck (duplicateCondition).

src/order.c

index bd3296d4b25a7649ff2c0b9b08d943d34f765ad2..753ce2c06a8d244d2d9ff339d972d96bb313c316 100644 (file)
@@ -1472,9 +1472,10 @@ transaction_check_order(Transaction *trans)
       p = trans->steps.elements[i];
       s = pool->solvables + p;
       if (s->repo != pool->installed)
+      {
        lastins = p;
-      if (s->repo != pool->installed)
        MAPSET(&ins, p);
+      }
       if (havescripts(pool, p, 0))
        {
          MAPZERO(&seen);