aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorAaron Lehmann <aaronl@vitelius.com>2002-11-28 11:27:31 +0000
committerAaron Lehmann <aaronl@vitelius.com>2002-11-28 11:27:31 +0000
commita170e1c858d35c474ceb9fecb41b37d681424094 (patch)
treecda2b13f10ca1ab0a3559d4b6ff663ed20d7106c /networking
parent1652855fbc830f41c7ee56ece1a30b328c4fb395 (diff)
downloadbusybox-a170e1c858d35c474ceb9fecb41b37d681424094.tar.gz
Change if(x)free(x); to free(x);
Diffstat (limited to 'networking')
-rw-r--r--networking/udhcp/dhcpc.c4
-rw-r--r--networking/udhcp/files.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 295486c98..b50b1ed03 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -246,7 +246,7 @@ int main(int argc, char *argv[])
switch (c) {
case 'c':
len = strlen(optarg) > 255 ? 255 : strlen(optarg);
- if (client_config.clientid) free(client_config.clientid);
+ free(client_config.clientid);
client_config.clientid = xmalloc(len + 2);
client_config.clientid[OPT_CODE] = DHCP_CLIENT_ID;
client_config.clientid[OPT_LEN] = len;
@@ -262,7 +262,7 @@ int main(int argc, char *argv[])
case 'h':
case 'H':
len = strlen(optarg) > 255 ? 255 : strlen(optarg);
- if (client_config.hostname) free(client_config.hostname);
+ free(client_config.hostname);
client_config.hostname = xmalloc(len + 2);
client_config.hostname[OPT_CODE] = DHCP_HOST_NAME;
client_config.hostname[OPT_LEN] = len;
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index 842e0f2db..cf72de1a8 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -38,7 +38,7 @@ static int read_str(char *line, void *arg)
{
char **dest = arg;
- if (*dest) free(*dest);
+ free(*dest);
*dest = strdup(line);
return 1;