summaryrefslogtreecommitdiffstats
path: root/monop/cards.c
diff options
context:
space:
mode:
authoritojun <itojun@NetBSD.org>2002-08-12 02:37:26 +0000
committeritojun <itojun@NetBSD.org>2002-08-12 02:37:26 +0000
commitc04c86951e9b1e852ef67779de06e401fadae0b8 (patch)
tree86258a7a0eecd71a8f34fb4ed12121229bf32a42 /monop/cards.c
parentd3ff8ece64e236ed8ec973809ebeadd38bb28f93 (diff)
downloadbsdgames-darwin-c04c86951e9b1e852ef67779de06e401fadae0b8.tar.gz
bsdgames-darwin-c04c86951e9b1e852ef67779de06e401fadae0b8.tar.zst
bsdgames-darwin-c04c86951e9b1e852ef67779de06e401fadae0b8.zip
calloc() arg mistake. it's (nelem, size). from openbsd
Diffstat (limited to 'monop/cards.c')
-rw-r--r--monop/cards.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/monop/cards.c b/monop/cards.c
index 08551cc2..fad1950d 100644
--- a/monop/cards.c
+++ b/monop/cards.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cards.c,v 1.11 1999/12/30 01:40:08 simonb Exp $ */
+/* $NetBSD: cards.c,v 1.12 2002/08/12 02:38:13 itojun Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)cards.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: cards.c,v 1.11 1999/12/30 01:40:08 simonb Exp $");
+__RCSID("$NetBSD: cards.c,v 1.12 2002/08/12 02:38:13 itojun Exp $");
#endif
#endif /* not lint */
@@ -101,7 +101,7 @@ set_up(dp)
int r1, r2;
int i;
- dp->offsets = (off_t *) calloc(sizeof (off_t), dp->num_cards);
+ dp->offsets = (off_t *) calloc(dp->num_cards, sizeof (off_t));
if (dp->offsets == NULL)
errx(1, "out of memory");
if (fread(dp->offsets, sizeof(off_t), dp->num_cards, deckf) !=