=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/apropos/Attic/apropos.c,v retrieving revision 1.11 retrieving revision 1.13 diff -u -r1.11 -r1.13 --- src/usr.bin/apropos/Attic/apropos.c 2005/10/17 19:04:19 1.11 +++ src/usr.bin/apropos/Attic/apropos.c 2007/08/06 19:16:06 1.13 @@ -1,4 +1,4 @@ -/* $OpenBSD: apropos.c,v 1.11 2005/10/17 19:04:19 otto Exp $ */ +/* $OpenBSD: apropos.c,v 1.13 2007/08/06 19:16:06 sobrado 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.13 2007/08/06 19:16:06 sobrado 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); @@ -218,6 +217,6 @@ { (void)fprintf(stderr, - "usage: apropos [-C file] [-M path] [-m path] keyword [...]\n"); + "usage: apropos [-C file] [-M path] [-m path] keyword ...\n"); exit(1); }