diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-03-16 00:42:18 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-04-28 18:23:59 +0200 |
commit | 92d0d757161d1950f11abb6e679bfdafa7cbfe85 (patch) | |
tree | 5a802f07352be2698807a30c43ed55150024e334 | |
parent | 66a9bad1a73bc33c4c5a9a00de8dc8ad35bdfaf1 (diff) | |
download | rpcd-92d0d757161d1950f11abb6e679bfdafa7cbfe85.tar.gz |
uci: use correct sort index when reordering sections
When reordering, the section indexes must be 0-based while the current
implementation incorrectly numbers starting with 1.
Fix this by start numbering ther sections with index 0.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | uci.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -968,7 +968,7 @@ rpc_uci_order(struct ubus_context *ctx, struct ubus_object *obj, struct blob_attr *cur; struct uci_package *p = NULL; struct uci_ptr ptr = { 0 }; - int rem, i = 1; + int rem, i = 0; blobmsg_parse(rpc_uci_order_policy, __RPC_O_MAX, tb, blob_data(msg), blob_len(msg)); |