svn commit: trunk/busybox: archival docs

aldot at busybox.net aldot at busybox.net
Tue Dec 12 11:50:45 UTC 2006


Author: aldot
Date: 2006-12-12 03:50:44 -0800 (Tue, 12 Dec 2006)
New Revision: 16850

Log:
- remove functions marked as LEGACY in SUSv3 and use their modern counterparts.


Modified:
   trunk/busybox/archival/tar.c
   trunk/busybox/docs/ipv4_ipv6.txt


Changeset:
Modified: trunk/busybox/archival/tar.c
===================================================================
--- trunk/busybox/archival/tar.c	2006-12-12 07:10:54 UTC (rev 16849)
+++ trunk/busybox/archival/tar.c	2006-12-12 11:50:44 UTC (rev 16850)
@@ -217,7 +217,7 @@
 	size = strlen(name) + 1 + dir; /* GNU tar uses strlen+1 */
 	/* + dir: account for possible '/' */
 
-	bzero(&header, sizeof(header));
+	memset(&header, 0, sizeof(header));
 	strcpy(header.name, "././@LongLink");
 	memcpy(header.mode, prefilled.mode, sizeof(prefilled));
 	PUT_OCTAL(header.size, size);
@@ -231,7 +231,7 @@
 	xwrite(fd, name, size - dir);
 	xwrite(fd, "/", dir);
 	size = (-size) & (TAR_BLOCK_SIZE-1);
-	bzero(&header, size);
+	memset(&header, 0, size);
 	xwrite(fd, &header, size);
 }
 #endif
@@ -246,7 +246,7 @@
 	if (sizeof(header) != 512)
 		BUG_tar_header_size();
 
-	bzero(&header, sizeof(struct TarHeader));
+	memset(&header, 0, sizeof(struct TarHeader));
 
 	strncpy(header.name, header_name, sizeof(header.name));
 
@@ -472,7 +472,7 @@
 		/* Pad the file up to the tar block size */
 		/* (a few tricks here in the name of code size) */
 		readSize = (-(int)readSize) & (TAR_BLOCK_SIZE-1);
-		bzero(bb_common_bufsiz1, readSize);
+		memset(bb_common_bufsiz1, 0, readSize);
 		xwrite(tbInfo->tarFd, bb_common_bufsiz1, readSize);
 	}
 
@@ -567,7 +567,7 @@
 		include = include->link;
 	}
 	/* Write two empty blocks to the end of the archive */
-	bzero(bb_common_bufsiz1, 2*TAR_BLOCK_SIZE);
+	memset(bb_common_bufsiz1, 0, 2*TAR_BLOCK_SIZE);
 	xwrite(tbInfo.tarFd, bb_common_bufsiz1, 2*TAR_BLOCK_SIZE);
 
 	/* To be pedantically correct, we would check if the tarball

Modified: trunk/busybox/docs/ipv4_ipv6.txt
===================================================================
--- trunk/busybox/docs/ipv4_ipv6.txt	2006-12-12 07:10:54 UTC (rev 16849)
+++ trunk/busybox/docs/ipv4_ipv6.txt	2006-12-12 11:50:44 UTC (rev 16850)
@@ -166,7 +166,7 @@
     int error;
 
     /* Get host address. Any type of address will do. */
-    bzero(&hints, sizeof(hints));
+    memset(&hints, 0, sizeof(hints));
     hints.ai_flags = AI_ALL|AI_ADDRCONFIG;
     hints.ai_socktype = SOCK_STREAM;
 




More information about the busybox-cvs mailing list