summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/csh/dir.c8
-rw-r--r--games/monop/cards.c6
-rw-r--r--lib/libpcap/optimize.c6
-rw-r--r--sbin/ncheck_ffs/ncheck_ffs.c6
-rw-r--r--sbin/restore/symtab.c6
-rw-r--r--usr.bin/compress/gzopen.c4
-rw-r--r--usr.bin/file/apprentice.c6
-rw-r--r--usr.bin/mail/cmd3.c8
-rw-r--r--usr.bin/mail/vars.c6
-rw-r--r--usr.bin/make/stats.c4
-rw-r--r--usr.bin/newsyslog/newsyslog.c6
-rw-r--r--usr.bin/sup/src/supmsg.c4
-rw-r--r--usr.bin/window/wwopen.c6
-rw-r--r--usr.sbin/user/defs.h4
14 files changed, 40 insertions, 40 deletions
diff --git a/bin/csh/dir.c b/bin/csh/dir.c
index 0a31e9eef72..64ad90d8754 100644
--- a/bin/csh/dir.c
+++ b/bin/csh/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.7 2002/06/09 05:47:27 todd Exp $ */
+/* $OpenBSD: dir.c,v 1.8 2002/08/12 00:42:56 aaron Exp $ */
/* $NetBSD: dir.c,v 1.9 1995/03/21 09:02:42 cgd Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dir.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: dir.c,v 1.7 2002/06/09 05:47:27 todd Exp $";
+static char rcsid[] = "$OpenBSD: dir.c,v 1.8 2002/08/12 00:42:56 aaron Exp $";
#endif
#endif /* not lint */
@@ -129,7 +129,7 @@ dinit(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;
@@ -372,7 +372,7 @@ dochngd(v, 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;
diff --git a/games/monop/cards.c b/games/monop/cards.c
index cc658247394..2906e353fff 100644
--- a/games/monop/cards.c
+++ b/games/monop/cards.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cards.c,v 1.6 2002/07/28 08:44:14 pjanzen Exp $ */
+/* $OpenBSD: cards.c,v 1.7 2002/08/12 00:42:56 aaron Exp $ */
/* $NetBSD: cards.c,v 1.3 1995/03/23 08:34:35 cgd Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)cards.c 8.1 (Berkeley) 5/31/93";
#else
-static const char rcsid[] = "$OpenBSD: cards.c,v 1.6 2002/07/28 08:44:14 pjanzen Exp $";
+static const char rcsid[] = "$OpenBSD: cards.c,v 1.7 2002/08/12 00:42:56 aaron Exp $";
#endif
#endif /* not lint */
@@ -100,7 +100,7 @@ set_up(dp)
int r1, r2;
int i;
- if ((dp->offsets = (int32_t *) calloc(sizeof (int32_t), dp->num_cards)) == NULL)
+ if ((dp->offsets = (int32_t *) calloc(dp->num_cards, sizeof (int32_t))) == NULL)
err(1, NULL);
for (i = 0 ; i < dp->num_cards ; i++) {
if (fread(&dp->offsets[i], sizeof(dp->offsets[i]), 1, deckf) != 1)
diff --git a/lib/libpcap/optimize.c b/lib/libpcap/optimize.c
index 356f65af653..832e183d233 100644
--- a/lib/libpcap/optimize.c
+++ b/lib/libpcap/optimize.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: optimize.c,v 1.8 2002/07/09 17:03:00 provos Exp $ */
+/* $OpenBSD: optimize.c,v 1.9 2002/08/12 00:42:56 aaron Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994, 1995, 1996
@@ -24,7 +24,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /home/cvs/src/lib/libpcap/optimize.c,v 1.8 2002/07/09 17:03:00 provos Exp $ (LBL)";
+ "@(#) $Header: /home/cvs/src/lib/libpcap/optimize.c,v 1.9 2002/08/12 00:42:56 aaron Exp $ (LBL)";
#endif
#include <sys/types.h>
@@ -1926,7 +1926,7 @@ convert_code_r(p)
/* generate offset[] for convenience */
if (slen) {
- offset = (struct slist **)calloc(sizeof(struct slist *), slen);
+ offset = (struct slist **)calloc(slen, sizeof(struct slist *));
if (!offset) {
bpf_error("not enough core");
/*NOTREACHED*/
diff --git a/sbin/ncheck_ffs/ncheck_ffs.c b/sbin/ncheck_ffs/ncheck_ffs.c
index 361936762ea..b10f9bb4689 100644
--- a/sbin/ncheck_ffs/ncheck_ffs.c
+++ b/sbin/ncheck_ffs/ncheck_ffs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncheck_ffs.c,v 1.13 2002/07/11 21:23:29 deraadt Exp $ */
+/* $OpenBSD: ncheck_ffs.c,v 1.14 2002/08/12 00:42:56 aaron Exp $ */
/*-
* Copyright (c) 1995, 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
@@ -31,7 +31,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.13 2002/07/11 21:23:29 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ncheck_ffs.c,v 1.14 2002/08/12 00:42:56 aaron Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -193,7 +193,7 @@ getino(ino_t inum)
if ((inum / sblock->fs_ipg) != iblk || itab == NULL) {
iblk = inum / sblock->fs_ipg;
if (itab == NULL &&
- (itab = calloc(sizeof(struct dinode), sblock->fs_ipg)) == NULL)
+ (itab = calloc(sblock->fs_ipg, sizeof(struct dinode))) == NULL)
errx(1, "no memory for inodes");
bread(fsbtodb(sblock, cgimin(sblock, iblk)), (char *)itab,
sblock->fs_ipg * sizeof(struct dinode));
diff --git a/sbin/restore/symtab.c b/sbin/restore/symtab.c
index d7fb03747cf..77282b072f5 100644
--- a/sbin/restore/symtab.c
+++ b/sbin/restore/symtab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: symtab.c,v 1.7 2002/02/16 21:27:37 millert Exp $ */
+/* $OpenBSD: symtab.c,v 1.8 2002/08/12 00:42:56 aaron Exp $ */
/* $NetBSD: symtab.c,v 1.10 1997/03/19 08:42:54 lukem Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)symtab.c 8.2 (Berkeley) 9/13/94";
#else
-static char rcsid[] = "$OpenBSD: symtab.c,v 1.7 2002/02/16 21:27:37 millert Exp $";
+static char rcsid[] = "$OpenBSD: symtab.c,v 1.8 2002/08/12 00:42:56 aaron Exp $";
#endif
#endif /* not lint */
@@ -575,7 +575,7 @@ initsymtable(filename)
panic("cannot stat symbol table file %s\n", filename);
}
tblsize = stbuf.st_size - sizeof(struct symtableheader);
- base = calloc(sizeof(char), (unsigned)tblsize);
+ base = calloc((unsigned)tblsize, sizeof(char));
if (base == NULL)
panic("cannot allocate space for symbol table\n");
if (read(fd, base, (int)tblsize) < 0 ||
diff --git a/usr.bin/compress/gzopen.c b/usr.bin/compress/gzopen.c
index 3514f912b92..43f997041fa 100644
--- a/usr.bin/compress/gzopen.c
+++ b/usr.bin/compress/gzopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gzopen.c,v 1.3 2002/02/16 21:27:45 millert Exp $ */
+/* $OpenBSD: gzopen.c,v 1.4 2002/08/12 00:42:56 aaron Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -135,7 +135,7 @@ gz_open (fd, mode, bits)
errno = EINVAL;
return NULL;
}
- if ((s = (gz_stream *)calloc(sizeof(gz_stream), 1)) == NULL)
+ if ((s = (gz_stream *)calloc(1, sizeof(gz_stream))) == NULL)
return NULL;
s->z_stream.zalloc = (alloc_func)0;
diff --git a/usr.bin/file/apprentice.c b/usr.bin/file/apprentice.c
index 482eb0a7484..7174f117b89 100644
--- a/usr.bin/file/apprentice.c
+++ b/usr.bin/file/apprentice.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apprentice.c,v 1.14 2002/06/05 13:46:44 itojun Exp $ */
+/* $OpenBSD: apprentice.c,v 1.15 2002/08/12 00:42:56 aaron Exp $ */
/*
* apprentice - make one pass through /etc/magic, learning its secrets.
@@ -36,7 +36,7 @@
#include "file.h"
#ifndef lint
-static char *moduleid = "$OpenBSD: apprentice.c,v 1.14 2002/06/05 13:46:44 itojun Exp $";
+static char *moduleid = "$OpenBSD: apprentice.c,v 1.15 2002/08/12 00:42:56 aaron Exp $";
#endif /* lint */
#define EATAB {while (isascii((unsigned char) *l) && \
@@ -65,7 +65,7 @@ int check; /* non-zero? checking-only run. */
int file_err, errs = -1;
maxmagic = MAXMAGIS;
- magic = (struct magic *) calloc(sizeof(struct magic), maxmagic);
+ magic = (struct magic *) calloc(maxmagic, sizeof(struct magic));
mfn = malloc(strlen(fn)+1);
if (magic == NULL || mfn == NULL) {
warn("malloc");
diff --git a/usr.bin/mail/cmd3.c b/usr.bin/mail/cmd3.c
index bddc3c8e66f..a8ecb29d24c 100644
--- a/usr.bin/mail/cmd3.c
+++ b/usr.bin/mail/cmd3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd3.c,v 1.18 2001/11/21 20:41:55 millert Exp $ */
+/* $OpenBSD: cmd3.c,v 1.19 2002/08/12 00:42:56 aaron Exp $ */
/* $NetBSD: cmd3.c,v 1.8 1997/07/09 05:29:49 mikel Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static const char sccsid[] = "@(#)cmd3.c 8.2 (Berkeley) 4/20/95";
#else
-static const char rcsid[] = "$OpenBSD: cmd3.c,v 1.18 2001/11/21 20:41:55 millert Exp $";
+static const char rcsid[] = "$OpenBSD: cmd3.c,v 1.19 2002/08/12 00:42:56 aaron Exp $";
#endif
#endif /* not lint */
@@ -491,7 +491,7 @@ group(void *v)
gname = *argv;
h = hash(gname);
if ((gh = findgroup(gname)) == NULL) {
- if ((gh = (struct grouphead *)calloc(sizeof(*gh), 1)) == NULL)
+ if ((gh = (struct grouphead *)calloc(1, sizeof(*gh))) == NULL)
errx(1, "Out of memory");
gh->g_name = vcopy(gname);
gh->g_list = NULL;
@@ -506,7 +506,7 @@ group(void *v)
*/
for (ap = argv+1; *ap != NULL; ap++) {
- if ((gp = (struct group *)calloc(sizeof(*gp), 1)) == NULL)
+ if ((gp = (struct group *)calloc(1, sizeof(*gp))) == NULL)
errx(1, "Out of memory");
gp->ge_name = vcopy(*ap);
gp->ge_link = gh->g_list;
diff --git a/usr.bin/mail/vars.c b/usr.bin/mail/vars.c
index e79ceda8099..9237583df1e 100644
--- a/usr.bin/mail/vars.c
+++ b/usr.bin/mail/vars.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vars.c,v 1.8 2001/11/21 20:41:56 millert Exp $ */
+/* $OpenBSD: vars.c,v 1.9 2002/08/12 00:42:56 aaron Exp $ */
/* $NetBSD: vars.c,v 1.4 1996/06/08 19:48:45 christos Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static const char sccsid[] = "@(#)vars.c 8.1 (Berkeley) 6/6/93";
#else
-static const char rcsid[] = "$OpenBSD: vars.c,v 1.8 2001/11/21 20:41:56 millert Exp $";
+static const char rcsid[] = "$OpenBSD: vars.c,v 1.9 2002/08/12 00:42:56 aaron Exp $";
#endif
#endif /* not lint */
@@ -63,7 +63,7 @@ assign(char *name, char *value)
h = hash(name);
vp = lookup(name);
if (vp == NULL) {
- if ((vp = (struct var *)calloc(sizeof(*vp), 1)) == NULL)
+ if ((vp = (struct var *)calloc(1, sizeof(*vp))) == NULL)
errx(1, "Out of memory");
vp->v_name = vcopy(name);
vp->v_link = variables[h];
diff --git a/usr.bin/make/stats.c b/usr.bin/make/stats.c
index 3fc53919411..4f8b173968e 100644
--- a/usr.bin/make/stats.c
+++ b/usr.bin/make/stats.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: stats.c,v 1.5 2001/06/12 22:44:22 espie Exp $ */
+/* $OpenBSD: stats.c,v 1.6 2002/08/12 00:42:56 aaron Exp $ */
/*
* Copyright (c) 1999 Marc Espie.
@@ -165,7 +165,7 @@ Init_Stats()
}
} else
/* or we don't -> simple stats gathering */
- statarray = ecalloc(sizeof(unsigned long), STAT_NUMBER);
+ statarray = ecalloc(STAT_NUMBER, sizeof(unsigned long));
STAT_INVOCATIONS++;
atexit(print_stats);
}
diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c
index 594a38a8b3c..03626180318 100644
--- a/usr.bin/newsyslog/newsyslog.c
+++ b/usr.bin/newsyslog/newsyslog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newsyslog.c,v 1.45 2002/06/26 23:36:14 wcobb Exp $ */
+/* $OpenBSD: newsyslog.c,v 1.46 2002/08/12 00:42:56 aaron Exp $ */
/*
* Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -88,7 +88,7 @@ provided "as is" without express or implied warranty.
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.45 2002/06/26 23:36:14 wcobb Exp $";
+static char rcsid[] = "$OpenBSD: newsyslog.c,v 1.46 2002/08/12 00:42:56 aaron Exp $";
#endif /* not lint */
#ifndef CONF
@@ -202,7 +202,7 @@ main(argc, argv)
p = q = parse_file(&listlen);
signal(SIGCHLD, child_killer);
- pidlist = (struct pidinfo *)calloc(sizeof(struct pidinfo), listlen + 1);
+ pidlist = (struct pidinfo *)calloc(listlen + 1, sizeof(struct pidinfo));
if (pidlist == NULL)
err(1, "calloc");
diff --git a/usr.bin/sup/src/supmsg.c b/usr.bin/sup/src/supmsg.c
index bef79abd553..adca8475f90 100644
--- a/usr.bin/sup/src/supmsg.c
+++ b/usr.bin/sup/src/supmsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: supmsg.c,v 1.11 2002/06/12 06:07:16 mpech Exp $ */
+/* $OpenBSD: supmsg.c,v 1.12 2002/08/12 00:42:56 aaron Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -745,7 +745,7 @@ msgxpatch()
if (x != SCMOK)
return (x);
xargc += 2;
- xargv = (char **)calloc(sizeof (char *), xargc+1);
+ xargv = (char **)calloc(xargc+1, sizeof (char *));
if (xargv == NULL)
return (SCMERR);
for (i = 2; i < xargc; i++) {
diff --git a/usr.bin/window/wwopen.c b/usr.bin/window/wwopen.c
index 650274cdaeb..aece7a0f859 100644
--- a/usr.bin/window/wwopen.c
+++ b/usr.bin/window/wwopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wwopen.c,v 1.7 2001/11/19 19:02:18 mpech Exp $ */
+/* $OpenBSD: wwopen.c,v 1.8 2002/08/12 00:42:56 aaron Exp $ */
/* $NetBSD: wwopen.c,v 1.6 1996/02/08 21:08:04 mycroft Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwopen.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$OpenBSD: wwopen.c,v 1.7 2001/11/19 19:02:18 mpech Exp $";
+static char rcsid[] = "$OpenBSD: wwopen.c,v 1.8 2002/08/12 00:42:56 aaron Exp $";
#endif
#endif /* not lint */
@@ -59,7 +59,7 @@ wwopen(type, oflags, nrow, ncol, row, col, nline)
char m;
short nvis;
- w = (struct ww *)calloc(sizeof (struct ww), 1);
+ w = (struct ww *)calloc(1, sizeof (struct ww));
if (w == 0) {
wwerrno = WWE_NOMEM;
goto bad;
diff --git a/usr.sbin/user/defs.h b/usr.sbin/user/defs.h
index bcebad28a4d..2d3ca7dc17b 100644
--- a/usr.sbin/user/defs.h
+++ b/usr.sbin/user/defs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: defs.h,v 1.2 2000/04/24 22:31:29 jakob Exp $ */
+/* $OpenBSD: defs.h,v 1.3 2002/08/12 00:42:56 aaron Exp $ */
/* $NetBSD: defs.h,v 1.5 1999/12/24 09:08:49 agc Exp $ */
/*
@@ -35,7 +35,7 @@
#define DEFS_H_
#define NEWARRAY(type,ptr,size,action) do { \
- if ((ptr = (type *) calloc(sizeof(type), size)) == (type *) NULL) { \
+ if ((ptr = (type *) calloc(size, sizeof(type))) == (type *) NULL) { \
warn("can't allocate %ld bytes", (long)(size * sizeof(type))); \
action; \
} \