summaryrefslogtreecommitdiffstats
path: root/usr.bin/file/apprentice.c
diff options
context:
space:
mode:
authoraaron <aaron@openbsd.org>2002-08-12 00:42:56 +0000
committeraaron <aaron@openbsd.org>2002-08-12 00:42:56 +0000
commitbb098db64ef14c5423a62bb1ac363d38c6d34323 (patch)
treef1e5b178ba3236cd7f19bbe8142396e0d65458ba /usr.bin/file/apprentice.c
parentDuring prompts on sun4 class machines, disable local echo to prevent (diff)
downloadwireguard-openbsd-bb098db64ef14c5423a62bb1ac363d38c6d34323.tar.xz
wireguard-openbsd-bb098db64ef14c5423a62bb1ac363d38c6d34323.zip
Swap args to calloc(3) so they are in the correct order; art@ ok.
Diffstat (limited to 'usr.bin/file/apprentice.c')
-rw-r--r--usr.bin/file/apprentice.c6
1 files changed, 3 insertions, 3 deletions
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");