diff --git a/dm/dmuci.c b/dm/dmuci.c index 6749a4f..659e245 100644 --- a/dm/dmuci.c +++ b/dm/dmuci.c @@ -421,7 +421,6 @@ char *dmuci_set_value(char *package, char *section, char *option, char *value) if (uci_set(uci_ctx, &ptr) != UCI_OK) { return ""; } - uci_save(uci_ctx, ptr.p); if (ptr.o) { return dmstrdup(ptr.o->v.string); // MEM WILL BE FREED IN DMMEMCLEAN } @@ -460,7 +459,6 @@ int dmuci_add_list_value(char *package, char *section, char *option, char *value if (uci_add_list(uci_ctx, &ptr) != UCI_OK) return -1; - uci_save(uci_ctx, ptr.p); return 0; } @@ -475,7 +473,6 @@ int dmuci_del_list_value(char *package, char *section, char *option, char *value if (uci_del_list(uci_ctx, &ptr) != UCI_OK) return -1; - uci_save(uci_ctx, ptr.p); return 0; } @@ -494,7 +491,6 @@ int dmuci_add_section(char *package, char *stype, struct uci_section **s, char * return -1; } - uci_save(uci_ctx, ptr.p); *value = dmstrdup((*s)->e.name); // MEM WILL BE FREED IN DMMEMCLEAN return 0; } @@ -527,7 +523,6 @@ int dmuci_delete(char *package, char *section, char *option, char *value) if (uci_delete(uci_ctx, &ptr) != UCI_OK) return -1; - uci_save(uci_ctx, ptr.p); return 0; } @@ -645,7 +640,6 @@ char *dmuci_set_value_by_section(struct uci_section *s, char *option, char *valu return ""; if (up.o) { - uci_save(uci_ctx, up.p); return dmstrdup(up.o->v.string); // MEM WILL BE FREED IN DMMEMCLEAN } return ""; @@ -662,7 +656,6 @@ int dmuci_delete_by_section(struct uci_section *s, char *option, char *value) if (uci_delete(uci_ctx, &up) != UCI_OK) return -1; - uci_save(uci_ctx, up.p); return 0; } @@ -676,7 +669,6 @@ int dmuci_add_list_value_by_section(struct uci_section *s, char *option, char *v if (uci_add_list(uci_ctx, &up) != UCI_OK) return -1; - uci_save(uci_ctx, up.p); return 0; } @@ -690,7 +682,6 @@ int dmuci_del_list_value_by_section(struct uci_section *s, char *option, char *v if (uci_del_list(uci_ctx, &up) != UCI_OK) return -1; - uci_save(uci_ctx, up.p); return 0; } diff --git a/netlink.c b/netlink.c index 19b541c..39e88e9 100644 --- a/netlink.c +++ b/netlink.c @@ -123,7 +123,7 @@ static void netlink_new_msg(struct uloop_fd *ufd, unsigned events) return; } - while (msg_size - sizeof(*nlh) > 0) { + while (msg_size > sizeof(*nlh)) { int len = nlh->nlmsg_len; int req_len = len - sizeof(*nlh); @@ -159,7 +159,7 @@ static void netlink_new_msg_v6(struct uloop_fd *ufd, unsigned events) return; } - while (msg_size - sizeof(*nlh) > 0 ) { + while (msg_size > sizeof(*nlh)) { int len = nlh->nlmsg_len; int req_len = len - sizeof(*nlh);