diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2002-08-12 00:42:57 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2002-08-12 00:42:57 +0000 |
commit | 87ffdf06b6ecc46b38ca953419304b64e37c7c95 (patch) | |
tree | 9e44c0b5a073ee17b9d7d3da181c696f012c6248 /usr.bin/file | |
parent | 941ec3d1051d178a11f6baa72a3d520413033f2e (diff) |
Swap args to calloc(3) so they are in the correct order; art@ ok.
Diffstat (limited to 'usr.bin/file')
-rw-r--r-- | usr.bin/file/apprentice.c | 6 |
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"); |