projects
/
oweals
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8cfeab
)
ubus: use safe iterator
author
Steven Barth
<steven@midlink.org>
Thu, 20 Mar 2014 10:18:02 +0000
(11:18 +0100)
committer
Steven Barth
<steven@midlink.org>
Thu, 20 Mar 2014 10:18:02 +0000
(11:18 +0100)
src/ubus.c
patch
|
blob
|
history
diff --git
a/src/ubus.c
b/src/ubus.c
index 47239fd06361529e99d88173659ef1f1249efba0..e2c310f037eb2f8dc1ec77bdde6c63defa7437b4 100644
(file)
--- a/
src/ubus.c
+++ b/
src/ubus.c
@@
-241,8
+241,8
@@
void ubus_apply_network(void)
blobmsg_get_string(tb[IFACE_ATTR_IFNAME]) : "";
bool matched = false;
- struct interface *c;
- list_for_each_entry
(c
, &interfaces, head) {
+ struct interface *c
, *n
;
+ list_for_each_entry
_safe(c, n
, &interfaces, head) {
char *f = memmem(c->upstream, c->upstream_len,
interface, strlen(interface) + 1);
bool cmatched = !strcmp(interface, c->name) || !strcmp(ifname, c->ifname);