diff options
author | Rob Landley <rob@landley.net> | 2006-05-26 23:44:51 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-05-26 23:44:51 +0000 |
commit | 8bb50782a5f0dd955a6fe18d381eb9322d1447e7 (patch) | |
tree | b717c772c6fef53c34b723341a8c5b12ccb57902 /networking | |
parent | 5edc10275ec86f6ce6af97a8e2e5eeccb3a2e8cb (diff) | |
download | busybox-w32-8bb50782a5f0dd955a6fe18d381eb9322d1447e7.tar.gz busybox-w32-8bb50782a5f0dd955a6fe18d381eb9322d1447e7.tar.bz2 busybox-w32-8bb50782a5f0dd955a6fe18d381eb9322d1447e7.zip |
Change llist_add_* to take the address of the list rather than returning the new
head, and change all the callers.
Diffstat (limited to 'networking')
-rw-r--r-- | networking/ifupdown.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 32b92fb62..038bb13bc 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -739,7 +739,7 @@ static struct interfaces_file_t *read_interfaces(const char *filename) | |||
739 | } | 739 | } |
740 | } | 740 | } |
741 | 741 | ||
742 | defn->ifaces = llist_add_to_end(defn->ifaces, (char*)currif); | 742 | llist_add_to_end(&(defn->ifaces), (char*)currif); |
743 | } | 743 | } |
744 | debug_noise("iface %s %s %s\n", currif->iface, address_family_name, method_name); | 744 | debug_noise("iface %s %s %s\n", currif->iface, address_family_name, method_name); |
745 | } | 745 | } |
@@ -753,7 +753,7 @@ static struct interfaces_file_t *read_interfaces(const char *filename) | |||
753 | } | 753 | } |
754 | 754 | ||
755 | /* Add the interface to the list */ | 755 | /* Add the interface to the list */ |
756 | defn->autointerfaces = llist_add_to_end(defn->autointerfaces, bb_xstrdup(firstword)); | 756 | llist_add_to_end(&(defn->autointerfaces), bb_xstrdup(firstword)); |
757 | debug_noise("\nauto %s\n", firstword); | 757 | debug_noise("\nauto %s\n", firstword); |
758 | } | 758 | } |
759 | currently_processing = NONE; | 759 | currently_processing = NONE; |
@@ -1202,14 +1202,14 @@ int ifupdown_main(int argc, char **argv) | |||
1202 | /* iface_down */ | 1202 | /* iface_down */ |
1203 | const llist_t *list = state_list; | 1203 | const llist_t *list = state_list; |
1204 | while (list) { | 1204 | while (list) { |
1205 | target_list = llist_add_to_end(target_list, bb_xstrdup(list->data)); | 1205 | llist_add_to_end(&target_list, bb_xstrdup(list->data)); |
1206 | list = list->link; | 1206 | list = list->link; |
1207 | } | 1207 | } |
1208 | target_list = defn->autointerfaces; | 1208 | target_list = defn->autointerfaces; |
1209 | #endif | 1209 | #endif |
1210 | } | 1210 | } |
1211 | } else { | 1211 | } else { |
1212 | target_list = llist_add_to_end(target_list, argv[optind]); | 1212 | llist_add_to_end(&target_list, argv[optind]); |
1213 | } | 1213 | } |
1214 | 1214 | ||
1215 | 1215 | ||
@@ -1311,7 +1311,7 @@ int ifupdown_main(int argc, char **argv) | |||
1311 | char *newiface = xmalloc(strlen(iface) + 1 + strlen(liface) + 1); | 1311 | char *newiface = xmalloc(strlen(iface) + 1 + strlen(liface) + 1); |
1312 | sprintf(newiface, "%s=%s", iface, liface); | 1312 | sprintf(newiface, "%s=%s", iface, liface); |
1313 | if (iface_state == NULL) { | 1313 | if (iface_state == NULL) { |
1314 | state_list = llist_add_to_end(state_list, newiface); | 1314 | llist_add_to_end(&state_list, newiface); |
1315 | } else { | 1315 | } else { |
1316 | free(iface_state->data); | 1316 | free(iface_state->data); |
1317 | iface_state->data = newiface; | 1317 | iface_state->data = newiface; |