=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/apropos/Attic/apropos.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- src/usr.bin/apropos/Attic/apropos.c 2005/10/17 19:04:19 1.11 +++ src/usr.bin/apropos/Attic/apropos.c 2006/04/02 21:38:56 1.12 @@ -1,4 +1,4 @@ -/* $OpenBSD: apropos.c,v 1.11 2005/10/17 19:04:19 otto Exp $ */ +/* $OpenBSD: apropos.c,v 1.12 2006/04/02 21:38:56 djm Exp $ */ /* $NetBSD: apropos.c,v 1.5 1995/09/04 20:46:20 tls Exp $ */ /* @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)apropos.c 8.8 (Berkeley) 5/4/95"; #else -static char rcsid[] = "$OpenBSD: apropos.c,v 1.11 2005/10/17 19:04:19 otto Exp $"; +static char rcsid[] = "$OpenBSD: apropos.c,v 1.12 2006/04/02 21:38:56 djm Exp $"; #endif #endif /* not lint */ @@ -99,9 +99,8 @@ if (argc < 1) usage(); - if ((found = malloc((u_int)argc * sizeof(int))) == NULL) + if ((found = calloc(argc, sizeof(int))) == NULL) err(1, NULL); - memset(found, 0, argc * sizeof(int)); for (p = argv; *p; ++p) /* convert to lower-case */ lowstr(*p, *p);