[BusyBox] changes to which.c

Glenn McGrath bug1 at optushome.com.au
Mon Sep 18 09:46:18 UTC 2000


I changed which.c so that it compiled cleanly under the Hurd as well as
linux.

The problem was that it used a variable PATH_MAX to declare the maximum
size of a buffer, i defered defining the buffer untill later when the
exact size needed was known and declared it to be that size.

I made some simplifications to the search for ':' and replace with 0
part.

I also removed the output that it displayed if no match was found. It
now behaves the same as GNU's which.

Im not sure if displaying an error message on a failure was needed for
anything, so maybe i shouldnt have done it without first discussing it
here, if it was there for a reason let me know and ill promptly change
it back.

Glenn





More information about the busybox mailing list