=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/which/which.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- src/usr.bin/which/which.c 2009/10/27 23:59:50 1.15 +++ src/usr.bin/which/which.c 2010/05/31 14:01:49 1.16 @@ -1,4 +1,4 @@ -/* $OpenBSD: which.c,v 1.15 2009/10/27 23:59:50 deraadt Exp $ */ +/* $OpenBSD: which.c,v 1.16 2010/05/31 14:01:49 sobrado Exp $ */ /* * Copyright (c) 1997 Todd C. Miller @@ -120,13 +120,13 @@ (void)puts(prog); return (1); } else { - (void)printf("%s: Command not found.\n", prog); + warnx("%s: Command not found.", prog); return (0); } } if ((path = strdup(path)) == NULL) - errx(1, "Can't allocate memory."); + err(1, "strdup"); pathcpy = path; proglen = strlen(prog); @@ -159,7 +159,7 @@ /* whereis(1) is silent on failure. */ if (!rval && progmode != PROG_WHEREIS) - (void)printf("%s: Command not found.\n", prog); + warnx("%s: Command not found.", prog); return (rval); }