summaryrefslogtreecommitdiff
path: root/src/app_fix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app_fix.c')
-rw-r--r--src/app_fix.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/app_fix.c b/src/app_fix.c
index ccd1e3c..5169176 100644
--- a/src/app_fix.c
+++ b/src/app_fix.c
@@ -74,15 +74,18 @@ static void mark_fix(struct fix_ctx *ctx, struct apk_name *name)
apk_solver_set_name_flags(name, ctx->solver_flags, ctx->fix_depends ? ctx->solver_flags : 0);
}
-static void set_solver_flags(struct apk_database *db, const char *match, struct apk_name *name, void *pctx)
+static int set_solver_flags(struct apk_database *db, const char *match, struct apk_name *name, void *pctx)
{
struct fix_ctx *ctx = pctx;
if (!name) {
apk_error("Package '%s' not found", match);
ctx->errors++;
- } else
- mark_fix(ctx, name);
+ return 0;
+ }
+
+ mark_fix(ctx, name);
+ return 0;
}
static int fix_main(void *pctx, struct apk_database *db, struct apk_string_array *args)
@@ -103,7 +106,7 @@ static int fix_main(void *pctx, struct apk_database *db, struct apk_string_array
mark_fix(ctx, ipkg->pkg->name);
}
} else
- apk_name_foreach_matching(db, args, apk_foreach_genid(), set_solver_flags, ctx);
+ apk_db_foreach_matching_name(db, args, set_solver_flags, ctx);
if (ctx->errors) return ctx->errors;