diff options
author | imp <imp@FreeBSD.org> | 1997-03-28 15:24:41 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-03-28 15:24:41 +0000 |
commit | 054f35c2222ef251bc2877814cf7bf5ff6038166 (patch) | |
tree | bf569c1217b3803ad2d64ba6083e1610213c7ece /bin/ls | |
parent | 3ad19c4ae3d0f156867d86a310e2d6d0f40a7a51 (diff) | |
download | FreeBSD-src-054f35c2222ef251bc2877814cf7bf5ff6038166.zip FreeBSD-src-054f35c2222ef251bc2877814cf7bf5ff6038166.tar.gz |
compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
Diffstat (limited to 'bin/ls')
-rw-r--r-- | bin/ls/ls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 60bb051..353914f 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: ls.c,v 1.13 1997/02/22 14:03:59 peter Exp $ */ #ifndef lint @@ -135,9 +135,9 @@ main(argc, argv) fts_options = FTS_PHYSICAL; #ifdef BSD4_4_LITE - while ((ch = getopt(argc, argv, "1ACFLRTacdfgikloqrstu")) != EOF) { + while ((ch = getopt(argc, argv, "1ACFLRTacdfgikloqrstu")) != -1) { #else - while ((ch = getopt(argc, argv, "1ACFLRTWacdfgikloqrstu")) != EOF) { + while ((ch = getopt(argc, argv, "1ACFLRTWacdfgikloqrstu")) != -1) { #endif switch (ch) { /* |