]> git.ipfire.org Git - pakfire.git/commitdiff
transaction: Don't declare anything after the label
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 9 Oct 2024 13:19:08 +0000 (13:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 9 Oct 2024 15:13:46 +0000 (15:13 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/transaction.c

index e2bc303a1f55addb26b276e9412aab7084805b7c..4c30078eb6dec03597441ecf718c053c677e5c81 100644 (file)
@@ -563,6 +563,8 @@ Solver* pakfire_transaction_get_solver(struct pakfire_transaction* transaction)
 
 PAKFIRE_EXPORT int pakfire_transaction_solve(struct pakfire_transaction* transaction,
                int flags, char** problems) {
+       clock_t solving_start;
+       clock_t solving_end;
        char* p = NULL;
        int solved = 0;
        int r;
@@ -580,13 +582,13 @@ PAKFIRE_EXPORT int pakfire_transaction_solve(struct pakfire_transaction* transac
 
 RETRY:
        // Save time when we starting solving
-       clock_t solving_start = clock();
+       solving_start = clock();
 
        // Solve the request and get the number of problems
        r = solver_solve(transaction->solver, &transaction->jobs);
 
        // Save time when we finished solving
-       clock_t solving_end = clock();
+       solving_end = clock();
 
        DEBUG(transaction->pakfire, "Solved request in %.4fms\n",
                (double)(solving_end - solving_start) * 1000 / CLOCKS_PER_SEC);