diff options
| author | bad <bad@NetBSD.org> | 1999-08-24 18:40:10 +0000 |
|---|---|---|
| committer | bad <bad@NetBSD.org> | 1999-08-24 18:40:10 +0000 |
| commit | d32511c2f48037596882b24db524c4e856f424c5 (patch) | |
| tree | 54f65a15f7d0ec4a2d16b357986a2623d3dcecc1 /gnu/usr.bin | |
| parent | 766b5fef17aa04116131c1c1494336b654467f98 (diff) | |
Cast hstat.st_size to size_t when passing it to ck_malloc().
Fixes PR port-m68k/8229.
Diffstat (limited to 'gnu/usr.bin')
| -rw-r--r-- | gnu/usr.bin/tar/gnu.c | 4 | ||||
| -rw-r--r-- | gnu/usr.bin/tar/list.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gnu/usr.bin/tar/gnu.c b/gnu/usr.bin/tar/gnu.c index 878546680d0..71e4608b858 100644 --- a/gnu/usr.bin/tar/gnu.c +++ b/gnu/usr.bin/tar/gnu.c @@ -18,7 +18,7 @@ along with GNU Tar; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef lint -static char rcsid[] = "$Id: gnu.c,v 1.4 1994/03/27 09:27:25 cgd Exp $"; +static char rcsid[] = "$Id: gnu.c,v 1.5 1999/08/24 18:40:10 bad Exp $"; #endif /* not lint */ #include <stdio.h> @@ -582,7 +582,7 @@ gnu_restore (skipcrud) add_buffer (the_buffer, "", 1); current_dir = get_buffer (the_buffer); - archive_dir = (char *) ck_malloc (hstat.st_size); + archive_dir = (char *) ck_malloc ((size_t)hstat.st_size); if (archive_dir == 0) { msg ("Can't allocate %qd bytes for restore", hstat.st_size); diff --git a/gnu/usr.bin/tar/list.c b/gnu/usr.bin/tar/list.c index 0a2200ee72b..1fcf7b1c73c 100644 --- a/gnu/usr.bin/tar/list.c +++ b/gnu/usr.bin/tar/list.c @@ -18,7 +18,7 @@ along with GNU Tar; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef lint -static char rcsid[] = "$Id: list.c,v 1.5 1997/06/06 07:59:52 jeremy Exp $"; +static char rcsid[] = "$Id: list.c,v 1.6 1999/08/24 18:40:10 bad Exp $"; #endif /* not lint */ /* @@ -384,7 +384,7 @@ recurse: userec (header); if (*longp) free (*longp); - bp = *longp = (char *) ck_malloc (hstat.st_size); + bp = *longp = (char *) ck_malloc ((size_t)hstat.st_size); for (size = hstat.st_size; size > 0; |
