Minor cleanups: Convert a few calloc() calls to xzalloc, remove unnecessary

memset, collate variable declarations...
This commit is contained in:
Rob Landley
2006-05-21 18:30:35 +00:00
parent c020f5f518
commit 9ffd42317b
4 changed files with 17 additions and 29 deletions

View File

@@ -159,7 +159,7 @@ static char **fill_envp(struct dhcpMessage *packet)
if (!(over & SNAME_FIELD) && packet->sname[0]) num_options++;
}
envp = xcalloc(sizeof(char *), num_options + 5);
envp = xzalloc(sizeof(char *) * (num_options + 5));
j = 0;
asprintf(&envp[j++], "interface=%s", client_config.interface);
asprintf(&envp[j++], "%s=%s", "PATH",