uci: rework variable usage

Signed-off-by: Luka Perkov <luka@openwrt.org>
This commit is contained in:
Luka Perkov 2014-05-29 12:57:35 +02:00 committed by Jo-Philipp Wich
parent 4cc6a9deb8
commit 7c789622a6

5
uci.c
View file

@ -1236,11 +1236,8 @@ static int
rpc_uci_apply_config(struct ubus_context *ctx, char *config)
{
struct uci_package *p = NULL;
struct uci_ptr ptr = { 0 };
ptr.package = config;
if (!uci_load(cursor, ptr.package, &p)) {
if (!uci_load(cursor, config, &p)) {
uci_commit(cursor, &p, false);
uci_unload(cursor, p);
}