diff options
author | ru <ru@FreeBSD.org> | 2006-11-27 22:17:11 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-11-27 22:17:11 +0000 |
commit | 04681b9d6f6256d3d9c21f3ef80f8db669c1d656 (patch) | |
tree | abbe44082e1f3ea44346f7ff42f15f71a25baa4e /bin/pax/tar.c | |
parent | 5511a715239bf3cd4863ed234ff9d60a14a0f752 (diff) | |
download | FreeBSD-src-04681b9d6f6256d3d9c21f3ef80f8db669c1d656.zip FreeBSD-src-04681b9d6f6256d3d9c21f3ef80f8db669c1d656.tar.gz |
Fix some of the alignment warnings on ARM.
Diffstat (limited to 'bin/pax/tar.c')
-rw-r--r-- | bin/pax/tar.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/pax/tar.c b/bin/pax/tar.c index c23cd5b..ab5bd3b 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -510,7 +510,7 @@ tar_wr(ARCHD *arcn) { HD_TAR *hd; int len; - char hdblk[sizeof(HD_TAR)]; + HD_TAR hdblk; /* * check for those file system types which tar cannot store @@ -569,7 +569,7 @@ tar_wr(ARCHD *arcn) * added after the file data (0 for all other types, as they only have * a header) */ - hd = (HD_TAR *)hdblk; + hd = &hdblk; l_strncpy(hd->name, arcn->name, sizeof(hd->name) - 1); hd->name[sizeof(hd->name) - 1] = '\0'; arcn->pad = 0; @@ -636,10 +636,10 @@ tar_wr(ARCHD *arcn) * 0 tells the caller to now write the file data, 1 says no data needs * to be written */ - if (ul_oct(tar_chksm(hdblk, sizeof(HD_TAR)), hd->chksum, + if (ul_oct(tar_chksm((char *)&hdblk, sizeof(HD_TAR)), hd->chksum, sizeof(hd->chksum), 3)) goto out; - if (wr_rdbuf(hdblk, sizeof(HD_TAR)) < 0) + if (wr_rdbuf((char *)&hdblk, sizeof(HD_TAR)) < 0) return(-1); if (wr_skip((off_t)(BLKMULT - sizeof(HD_TAR))) < 0) return(-1); @@ -898,7 +898,7 @@ ustar_wr(ARCHD *arcn) { HD_USTAR *hd; char *pt; - char hdblk[sizeof(HD_USTAR)]; + HD_USTAR hdblk; /* * check for those file system types ustar cannot store @@ -926,7 +926,7 @@ ustar_wr(ARCHD *arcn) paxwarn(1, "File name too long for ustar %s", arcn->name); return(1); } - hd = (HD_USTAR *)hdblk; + hd = &hdblk; arcn->pad = 0L; /* @@ -1044,10 +1044,10 @@ ustar_wr(ARCHD *arcn) * return 0 tells the caller to now write the file data, 1 says no data * needs to be written */ - if (ul_oct(tar_chksm(hdblk, sizeof(HD_USTAR)), hd->chksum, + if (ul_oct(tar_chksm((char *)&hdblk, sizeof(HD_USTAR)), hd->chksum, sizeof(hd->chksum), 3)) goto out; - if (wr_rdbuf(hdblk, sizeof(HD_USTAR)) < 0) + if (wr_rdbuf((char *)&hdblk, sizeof(HD_USTAR)) < 0) return(-1); if (wr_skip((off_t)(BLKMULT - sizeof(HD_USTAR))) < 0) return(-1); |