summaryrefslogtreecommitdiff
path: root/networking/ifupdown.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-20 19:40:36 +0000
committerDenis Vlasenko2006-11-20 19:40:36 +0000
commit736230e2098e55720a1e235b1c13bdd1a3372c86 (patch)
tree8269cafd5207e1d2d3f3870c83b2e0b2bdc3bf42 /networking/ifupdown.c
parentc9cdeaa3fef3f93eb259957d36c760ec8902e0c1 (diff)
downloadbusybox-736230e2098e55720a1e235b1c13bdd1a3372c86.zip
busybox-736230e2098e55720a1e235b1c13bdd1a3372c86.tar.gz
dhcprelay: new applet
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r--networking/ifupdown.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index ede2f89..f72e653 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
{
int i;
+ if (!name)
+ return NULL;
+
for (i = 0; af[i]; i++) {
if (strcmp(af[i]->name, name) == 0) {
return af[i];
@@ -610,6 +613,9 @@ static const struct method_t *get_method(const struct address_family_t *af, char
{
int i;
+ if (!name)
+ return NULL;
+
for (i = 0; i < af->n_methods; i++) {
if (strcmp(af->method[i].name, name) == 0) {
return &af->method[i];
@@ -620,6 +626,9 @@ static const struct method_t *get_method(const struct address_family_t *af, char
static const llist_t *find_list_string(const llist_t *list, const char *string)
{
+ if (string == NULL)
+ return NULL;
+
while (list) {
if (strcmp(list->data, string) == 0) {
return list;