summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2006-12-12 11:50:44 +0000
committerBernhard Reutner-Fischer2006-12-12 11:50:44 +0000
commit6f0540e7eca61fa10344699d023f4a90f705601d (patch)
treea71489f9c5b37b4095d05345f3ac2dc33fb6835b /archival
parent32f3ebf08f1c3fbd7279cb031efc87a9ddfa5502 (diff)
downloadbusybox-6f0540e7eca61fa10344699d023f4a90f705601d.zip
busybox-6f0540e7eca61fa10344699d023f4a90f705601d.tar.gz
- remove functions marked as LEGACY in SUSv3 and use their modern counterparts.
Diffstat (limited to 'archival')
-rw-r--r--archival/tar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 6a4c4e7..79c3595 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)
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 @@ static void writeLongname(int fd, int type, const char *name, int dir)
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 @@ static int writeTarHeader(struct TarBallInfo *tbInfo,
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 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf,
/* 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 @@ static int writeTarFile(const int tar_fd, const int verboseFlag,
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