diff --git a/bin/csh/dir.c b/bin/csh/dir.c index 0761506b6f28..416e5e397994 100644 --- a/bin/csh/dir.c +++ b/bin/csh/dir.c @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.19 2002/05/25 23:29:16 wiz Exp $ */ +/* $NetBSD: dir.c,v 1.20 2002/08/12 02:37:26 itojun Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)dir.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: dir.c,v 1.19 2002/05/25 23:29:16 wiz Exp $"); +__RCSID("$NetBSD: dir.c,v 1.20 2002/08/12 02:37:26 itojun Exp $"); #endif #endif /* not lint */ @@ -130,7 +130,7 @@ dinit(Char *hp) } } - dp = (struct directory *)xcalloc(sizeof(struct directory), 1); + dp = (struct directory *)xcalloc(1, sizeof(struct directory)); dp->di_name = Strsave(cp); dp->di_count = 0; dhead.di_next = dhead.di_prev = dp; @@ -365,7 +365,7 @@ dochngd(Char **v, struct command *t) } else cp = dfollow(*v); - dp = (struct directory *)xcalloc(sizeof(struct directory), 1); + dp = (struct directory *)xcalloc(1, sizeof(struct directory)); dp->di_name = cp; dp->di_count = 0; dp->di_next = dcwd->di_next; @@ -512,7 +512,7 @@ dopushd(Char **v, struct command *t) Char *ccp; ccp = dfollow(*v); - dp = (struct directory *)xcalloc(sizeof(struct directory), 1); + dp = (struct directory *)xcalloc(1, sizeof(struct directory)); dp->di_name = ccp; dp->di_count = 0; dp->di_prev = dcwd; diff --git a/bin/csh/file.c b/bin/csh/file.c index d37d2a7b5e10..d22dbd7b43be 100644 --- a/bin/csh/file.c +++ b/bin/csh/file.c @@ -1,4 +1,4 @@ -/* $NetBSD: file.c,v 1.19 2002/05/25 23:29:16 wiz Exp $ */ +/* $NetBSD: file.c,v 1.20 2002/08/12 02:37:26 itojun Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)file.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: file.c,v 1.19 2002/05/25 23:29:16 wiz Exp $"); +__RCSID("$NetBSD: file.c,v 1.20 2002/08/12 02:37:26 itojun Exp $"); #endif #endif /* not lint */ @@ -532,7 +532,7 @@ again: /* search for matches */ break; } if (items == NULL) - items = (Char **)xcalloc(sizeof(items[0]), MAXITEMS); + items = (Char **)xcalloc(MAXITEMS, sizeof(items[0])); items[numitems] = (Char *)xmalloc((size_t) (Strlen(entry) + 1) * sizeof(Char)); copyn(items[numitems], entry, MAXNAMLEN); diff --git a/games/monop/cards.c b/games/monop/cards.c index 08551cc28517..fad1950d86c3 100644 --- a/games/monop/cards.c +++ b/games/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) !=