From: Felix Fietkau Date: Tue, 12 Feb 2008 11:11:15 +0000 (+0100) Subject: use the per-package backend on commit X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4f629ff865b978a7ea399776ff6af83c6428bda0;p=uci.git use the per-package backend on commit --- diff --git a/libuci.c b/libuci.c index da2d15e..6bbc874 100644 --- a/libuci.c +++ b/libuci.c @@ -172,11 +172,13 @@ int uci_list_configs(struct uci_context *ctx, char ***list) int uci_commit(struct uci_context *ctx, struct uci_package **package, bool overwrite) { + struct uci_package *p; UCI_HANDLE_ERR(ctx); UCI_ASSERT(ctx, package != NULL); - UCI_ASSERT(ctx, *package != NULL); - UCI_ASSERT(ctx, ctx->backend && ctx->backend->commit); - ctx->backend->commit(ctx, package, overwrite); + p = *package; + UCI_ASSERT(ctx, p != NULL); + UCI_ASSERT(ctx, p->backend && p->backend->commit); + p->backend->commit(ctx, package, overwrite); return 0; }