tar: Cast to proper type, no functional change

This commit is contained in:
sin 2015-04-21 16:19:41 +01:00
parent 22c0ae67a4
commit 0925bf95ac
1 changed files with 2 additions and 2 deletions

4
tar.c
View File

@ -113,7 +113,7 @@ archive(const char *path)
pw = getpwuid(st.st_uid); pw = getpwuid(st.st_uid);
gr = getgrgid(st.st_gid); gr = getgrgid(st.st_gid);
h = (void *)b; h = (struct header *)b;
memset(b, 0, sizeof(b)); memset(b, 0, sizeof(b));
estrlcpy(h->name, path, sizeof(h->name)); estrlcpy(h->name, path, sizeof(h->name));
putoctal(h->mode, (unsigned)st.st_mode & 0777, sizeof(h->mode)); putoctal(h->mode, (unsigned)st.st_mode & 0777, sizeof(h->mode));
@ -171,7 +171,7 @@ unarchive(char *fname, ssize_t l, char b[BLKSIZ])
{ {
FILE *f = NULL; FILE *f = NULL;
struct timeval times[2]; struct timeval times[2];
struct header *h = (void *)b; struct header *h = (struct header *)b;
long mode, major, minor, type, mtime, uid, gid; long mode, major, minor, type, mtime, uid, gid;
char lname[101], *tmp, *p; char lname[101], *tmp, *p;