--- src/usr.bin/which/which.c 2004/03/25 16:18:40 1.1 +++ src/usr.bin/which/which.c 2005/03/03 17:09:58 1.2 @@ -26,9 +26,6 @@ * $DragonFly$ */ -#include - - #include #include @@ -79,7 +76,7 @@ main(int argc, char **argv) pathlen = strlen(p) + 1; path = malloc(pathlen); if (path == NULL) - err(EXIT_FAILURE, NULL); + err(EXIT_FAILURE, "malloc failed"); if (argc == 0) status = EXIT_FAILURE; @@ -101,12 +98,11 @@ main(int argc, char **argv) static void usage(void) { - errx(EXIT_FAILURE, "usage: which [-as] program ..."); } static int -is_there(char *candidate) +is_there(const char *candidate) { struct stat fin;