Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/whereis

Module Name:    src
Committed By:   apb
Date:           Fri Oct 17 10:53:26 UTC 2008

Modified Files:
        src/usr.bin/whereis: whereis.c

Log Message:
Fix a bug in which which(1) would check only the first element of the
path for all args except the first.  So "which cp vi" found /bin/cp
using the first entry in the path, but failed to find /usr/bin/vi
using the second entry in the path, although "whereis cp vi" worked.
Restoring the ":" was done in the wrong place.

Also fix a bug in which an arg beginning with "/" would cause all
subsequent args to be ignored.  A "break" should have been "continue".
Add comments to all break and continue statements saying what they are
intended to do.

Also add braces around the body of a for loop which contained only one
multi-line statement.

To generate a diff of this commit:
cvs rdiff -r1.20 -r1.21 src/usr.bin/whereis/whereis.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index