=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/file/Attic/apprentice.c,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** src/usr.bin/file/Attic/apprentice.c 2002/06/05 13:46:44 1.14 --- src/usr.bin/file/Attic/apprentice.c 2002/08/12 00:42:56 1.15 *************** *** 1,4 **** ! /* $OpenBSD: apprentice.c,v 1.14 2002/06/05 13:46:44 itojun Exp $ */ /* * apprentice - make one pass through /etc/magic, learning its secrets. --- 1,4 ---- ! /* $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,42 **** #include "file.h" #ifndef lint ! static char *moduleid = "$OpenBSD: apprentice.c,v 1.14 2002/06/05 13:46:44 itojun Exp $"; #endif /* lint */ #define EATAB {while (isascii((unsigned char) *l) && \ --- 36,42 ---- #include "file.h" #ifndef lint ! 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,71 **** int file_err, errs = -1; maxmagic = MAXMAGIS; ! magic = (struct magic *) calloc(sizeof(struct magic), maxmagic); mfn = malloc(strlen(fn)+1); if (magic == NULL || mfn == NULL) { warn("malloc"); --- 65,71 ---- int file_err, errs = -1; maxmagic = MAXMAGIS; ! magic = (struct magic *) calloc(maxmagic, sizeof(struct magic)); mfn = malloc(strlen(fn)+1); if (magic == NULL || mfn == NULL) { warn("malloc");