aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-12-12 11:50:44 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-12-12 11:50:44 +0000
commit6217166ab258b418c80f18ee55d9e4b19b76a972 (patch)
treea71489f9c5b37b4095d05345f3ac2dc33fb6835b
parenteadaaa8eb3818706cc5d52e889b88efdfb2cae24 (diff)
downloadbusybox-w32-6217166ab258b418c80f18ee55d9e4b19b76a972.tar.gz
busybox-w32-6217166ab258b418c80f18ee55d9e4b19b76a972.tar.bz2
busybox-w32-6217166ab258b418c80f18ee55d9e4b19b76a972.zip
- remove functions marked as LEGACY in SUSv3 and use their modern counterparts.
git-svn-id: svn://busybox.net/trunk/busybox@16850 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--archival/tar.c10
-rw-r--r--docs/ipv4_ipv6.txt2
2 files changed, 6 insertions, 6 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 6a4c4e7e8..79c3595ac 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -217,7 +217,7 @@ static void writeLongname(int fd, int type, const char *name, int dir)
217 size = strlen(name) + 1 + dir; /* GNU tar uses strlen+1 */ 217 size = strlen(name) + 1 + dir; /* GNU tar uses strlen+1 */
218 /* + dir: account for possible '/' */ 218 /* + dir: account for possible '/' */
219 219
220 bzero(&header, sizeof(header)); 220 memset(&header, 0, sizeof(header));
221 strcpy(header.name, "././@LongLink"); 221 strcpy(header.name, "././@LongLink");
222 memcpy(header.mode, prefilled.mode, sizeof(prefilled)); 222 memcpy(header.mode, prefilled.mode, sizeof(prefilled));
223 PUT_OCTAL(header.size, size); 223 PUT_OCTAL(header.size, size);
@@ -231,7 +231,7 @@ static void writeLongname(int fd, int type, const char *name, int dir)
231 xwrite(fd, name, size - dir); 231 xwrite(fd, name, size - dir);
232 xwrite(fd, "/", dir); 232 xwrite(fd, "/", dir);
233 size = (-size) & (TAR_BLOCK_SIZE-1); 233 size = (-size) & (TAR_BLOCK_SIZE-1);
234 bzero(&header, size); 234 memset(&header, 0, size);
235 xwrite(fd, &header, size); 235 xwrite(fd, &header, size);
236} 236}
237#endif 237#endif
@@ -246,7 +246,7 @@ static int writeTarHeader(struct TarBallInfo *tbInfo,
246 if (sizeof(header) != 512) 246 if (sizeof(header) != 512)
247 BUG_tar_header_size(); 247 BUG_tar_header_size();
248 248
249 bzero(&header, sizeof(struct TarHeader)); 249 memset(&header, 0, sizeof(struct TarHeader));
250 250
251 strncpy(header.name, header_name, sizeof(header.name)); 251 strncpy(header.name, header_name, sizeof(header.name));
252 252
@@ -472,7 +472,7 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf,
472 /* Pad the file up to the tar block size */ 472 /* Pad the file up to the tar block size */
473 /* (a few tricks here in the name of code size) */ 473 /* (a few tricks here in the name of code size) */
474 readSize = (-(int)readSize) & (TAR_BLOCK_SIZE-1); 474 readSize = (-(int)readSize) & (TAR_BLOCK_SIZE-1);
475 bzero(bb_common_bufsiz1, readSize); 475 memset(bb_common_bufsiz1, 0, readSize);
476 xwrite(tbInfo->tarFd, bb_common_bufsiz1, readSize); 476 xwrite(tbInfo->tarFd, bb_common_bufsiz1, readSize);
477 } 477 }
478 478
@@ -567,7 +567,7 @@ static int writeTarFile(const int tar_fd, const int verboseFlag,
567 include = include->link; 567 include = include->link;
568 } 568 }
569 /* Write two empty blocks to the end of the archive */ 569 /* Write two empty blocks to the end of the archive */
570 bzero(bb_common_bufsiz1, 2*TAR_BLOCK_SIZE); 570 memset(bb_common_bufsiz1, 0, 2*TAR_BLOCK_SIZE);
571 xwrite(tbInfo.tarFd, bb_common_bufsiz1, 2*TAR_BLOCK_SIZE); 571 xwrite(tbInfo.tarFd, bb_common_bufsiz1, 2*TAR_BLOCK_SIZE);
572 572
573 /* To be pedantically correct, we would check if the tarball 573 /* To be pedantically correct, we would check if the tarball
diff --git a/docs/ipv4_ipv6.txt b/docs/ipv4_ipv6.txt
index e83db0dbd..92010b59c 100644
--- a/docs/ipv4_ipv6.txt
+++ b/docs/ipv4_ipv6.txt
@@ -166,7 +166,7 @@ Modified IPv6-aware C code:
166 int error; 166 int error;
167 167
168 /* Get host address. Any type of address will do. */ 168 /* Get host address. Any type of address will do. */
169 bzero(&hints, sizeof(hints)); 169 memset(&hints, 0, sizeof(hints));
170 hints.ai_flags = AI_ALL|AI_ADDRCONFIG; 170 hints.ai_flags = AI_ALL|AI_ADDRCONFIG;
171 hints.ai_socktype = SOCK_STREAM; 171 hints.ai_socktype = SOCK_STREAM;
172 172