uci: rework variable usage
Signed-off-by: Luka Perkov <luka@openwrt.org>
This commit is contained in:
parent
4cc6a9deb8
commit
7c789622a6
1 changed files with 1 additions and 4 deletions
5
uci.c
5
uci.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue