aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/script.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-05-21 18:30:35 +0000
committerRob Landley <rob@landley.net>2006-05-21 18:30:35 +0000
commit9ffd42317b5a53c2236268808e34c90601f286c1 (patch)
treeb126ca6ff7d2db91fa3525c6e5d3978932137fa3 /networking/udhcp/script.c
parentc020f5f518714af603488c7d9e6cc72543fabc49 (diff)
downloadbusybox-w32-9ffd42317b5a53c2236268808e34c90601f286c1.tar.gz
busybox-w32-9ffd42317b5a53c2236268808e34c90601f286c1.tar.bz2
busybox-w32-9ffd42317b5a53c2236268808e34c90601f286c1.zip
Minor cleanups: Convert a few calloc() calls to xzalloc, remove unnecessary
memset, collate variable declarations...
Diffstat (limited to 'networking/udhcp/script.c')
-rw-r--r--networking/udhcp/script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c
index b6b0e0d59..2a4732104 100644
--- a/networking/udhcp/script.c
+++ b/networking/udhcp/script.c
@@ -159,7 +159,7 @@ static char **fill_envp(struct dhcpMessage *packet)
159 if (!(over & SNAME_FIELD) && packet->sname[0]) num_options++; 159 if (!(over & SNAME_FIELD) && packet->sname[0]) num_options++;
160 } 160 }
161 161
162 envp = xcalloc(sizeof(char *), num_options + 5); 162 envp = xzalloc(sizeof(char *) * (num_options + 5));
163 j = 0; 163 j = 0;
164 asprintf(&envp[j++], "interface=%s", client_config.interface); 164 asprintf(&envp[j++], "interface=%s", client_config.interface);
165 asprintf(&envp[j++], "%s=%s", "PATH", 165 asprintf(&envp[j++], "%s=%s", "PATH",