diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-20 19:40:36 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-20 19:40:36 +0000 |
commit | 736230e2098e55720a1e235b1c13bdd1a3372c86 (patch) | |
tree | 8269cafd5207e1d2d3f3870c83b2e0b2bdc3bf42 /networking/ifupdown.c | |
parent | c9cdeaa3fef3f93eb259957d36c760ec8902e0c1 (diff) | |
download | busybox-w32-736230e2098e55720a1e235b1c13bdd1a3372c86.tar.gz busybox-w32-736230e2098e55720a1e235b1c13bdd1a3372c86.tar.bz2 busybox-w32-736230e2098e55720a1e235b1c13bdd1a3372c86.zip |
dhcprelay: new applet
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r-- | networking/ifupdown.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index ede2f8997..f72e653b3 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -598,6 +598,9 @@ static const struct address_family_t *get_address_family(const struct address_fa | |||
598 | { | 598 | { |
599 | int i; | 599 | int i; |
600 | 600 | ||
601 | if (!name) | ||
602 | return NULL; | ||
603 | |||
601 | for (i = 0; af[i]; i++) { | 604 | for (i = 0; af[i]; i++) { |
602 | if (strcmp(af[i]->name, name) == 0) { | 605 | if (strcmp(af[i]->name, name) == 0) { |
603 | return af[i]; | 606 | return af[i]; |
@@ -610,6 +613,9 @@ static const struct method_t *get_method(const struct address_family_t *af, char | |||
610 | { | 613 | { |
611 | int i; | 614 | int i; |
612 | 615 | ||
616 | if (!name) | ||
617 | return NULL; | ||
618 | |||
613 | for (i = 0; i < af->n_methods; i++) { | 619 | for (i = 0; i < af->n_methods; i++) { |
614 | if (strcmp(af->method[i].name, name) == 0) { | 620 | if (strcmp(af->method[i].name, name) == 0) { |
615 | return &af->method[i]; | 621 | return &af->method[i]; |
@@ -620,6 +626,9 @@ static const struct method_t *get_method(const struct address_family_t *af, char | |||
620 | 626 | ||
621 | static const llist_t *find_list_string(const llist_t *list, const char *string) | 627 | static const llist_t *find_list_string(const llist_t *list, const char *string) |
622 | { | 628 | { |
629 | if (string == NULL) | ||
630 | return NULL; | ||
631 | |||
623 | while (list) { | 632 | while (list) { |
624 | if (strcmp(list->data, string) == 0) { | 633 | if (strcmp(list->data, string) == 0) { |
625 | return list; | 634 | return list; |