[BusyBox-cvs] busybox/networking/udhcp dhcpc.c,1.2,1.3 files.c,1.1,1.2
Aaron Lehmann
aaronl at busybox.net
Thu Nov 28 11:28:03 UTC 2002
Update of /var/cvs/busybox/networking/udhcp
In directory winder:/tmp/cvs-serv23182/networking/udhcp
Modified Files:
dhcpc.c files.c
Log Message:
Change if(x)free(x); to free(x);
Index: dhcpc.c
===================================================================
RCS file: /var/cvs/busybox/networking/udhcp/dhcpc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dhcpc.c 31 Oct 2002 19:21:27 -0000 1.2
+++ dhcpc.c 28 Nov 2002 11:27:29 -0000 1.3
@@ -246,7 +246,7 @@
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 @@
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;
Index: files.c
===================================================================
RCS file: /var/cvs/busybox/networking/udhcp/files.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- files.c 14 Oct 2002 21:41:27 -0000 1.1
+++ files.c 28 Nov 2002 11:27:29 -0000 1.2
@@ -38,7 +38,7 @@
{
char **dest = arg;
- if (*dest) free(*dest);
+ free(*dest);
*dest = strdup(line);
return 1;
More information about the busybox-cvs
mailing list