Path count was out by one, fixed it
authorGlenn L McGrath <bug1@ihug.co.nz>
Mon, 18 Sep 2000 09:52:03 +0000 (09:52 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Mon, 18 Sep 2000 09:52:03 +0000 (09:52 -0000)
findutils/which.c
which.c

index dc162dca5658585bb15d3ebad8bb292d695dccba..7df2557a316208422cf4857b74fae5f2c5a15f65 100644 (file)
@@ -28,7 +28,7 @@ extern int which_main(int argc, char **argv)
 {
        char *path_list, *path_n;
        struct stat filestat;
-       int i, count=0;
+       int i, count=1;
 
        if (argc <= 1 || **(argv + 1) == '-')
                usage(which_usage);
diff --git a/which.c b/which.c
index dc162dca5658585bb15d3ebad8bb292d695dccba..7df2557a316208422cf4857b74fae5f2c5a15f65 100644 (file)
--- a/which.c
+++ b/which.c
@@ -28,7 +28,7 @@ extern int which_main(int argc, char **argv)
 {
        char *path_list, *path_n;
        struct stat filestat;
-       int i, count=0;
+       int i, count=1;
 
        if (argc <= 1 || **(argv + 1) == '-')
                usage(which_usage);