svn commit: trunk/busybox: editors libbb networking/udhcp

vda at busybox.net vda at busybox.net
Fri Jan 19 21:33:20 UTC 2007


Author: vda
Date: 2007-01-19 13:33:19 -0800 (Fri, 19 Jan 2007)
New Revision: 17392

Log:
strdup -> xstrdup
sed: de-obfuscate piece of code


Modified:
   trunk/busybox/editors/sed.c
   trunk/busybox/libbb/loop.c
   trunk/busybox/networking/udhcp/files.c


Changeset:
Modified: trunk/busybox/editors/sed.c
===================================================================
--- trunk/busybox/editors/sed.c	2007-01-19 21:24:17 UTC (rev 17391)
+++ trunk/busybox/editors/sed.c	2007-01-19 21:33:19 UTC (rev 17392)
@@ -175,12 +175,13 @@
 	while (i < len) {
 		if (string[i] == '\\') {
 			if (!to || string[i+1] == from) {
-				*(dest++) = to ? to : string[i+1];
+				*dest++ = to ? to : string[i+1];
 				i += 2;
 				continue;
-			} else *(dest++) = string[i++];
+			}
+			*dest++ = string[i++];
 		}
-		*(dest++) = string[i++];
+		*dest++ = string[i++];
 	}
 	*dest = 0;
 }

Modified: trunk/busybox/libbb/loop.c
===================================================================
--- trunk/busybox/libbb/loop.c	2007-01-19 21:24:17 UTC (rev 17391)
+++ trunk/busybox/libbb/loop.c	2007-01-19 21:33:19 UTC (rev 17392)
@@ -142,7 +142,7 @@
 	}
 	close(ffd);
 	if (!rc) {
-		if (!*device) *device = strdup(dev);
+		if (!*device) *device = xstrdup(dev);
 		return mode==O_RDONLY ? 1 : 0;
 	}
 	return rc;

Modified: trunk/busybox/networking/udhcp/files.c
===================================================================
--- trunk/busybox/networking/udhcp/files.c	2007-01-19 21:24:17 UTC (rev 17391)
+++ trunk/busybox/networking/udhcp/files.c	2007-01-19 21:33:19 UTC (rev 17392)
@@ -56,7 +56,7 @@
 	char **dest = arg;
 
 	free(*dest);
-	*dest = strdup(line);
+	*dest = xstrdup(line);
 
 	return 1;
 }




More information about the busybox-cvs mailing list