summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorbad <bad@NetBSD.org>1999-08-24 18:40:10 +0000
committerbad <bad@NetBSD.org>1999-08-24 18:40:10 +0000
commitd32511c2f48037596882b24db524c4e856f424c5 (patch)
tree54f65a15f7d0ec4a2d16b357986a2623d3dcecc1 /gnu/usr.bin
parent766b5fef17aa04116131c1c1494336b654467f98 (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.c4
-rw-r--r--gnu/usr.bin/tar/list.c4
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;