aboutsummaryrefslogtreecommitdiff
path: root/bin/ls
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>1997-03-28 15:24:41 +0000
committerWarner Losh <imp@FreeBSD.org>1997-03-28 15:24:41 +0000
commit93ef08af3ef1a9fb7a3af6b7212d3ca094e9aba6 (patch)
tree27b535c748fe2bf5a45a09dca51479595187c73f /bin/ls
parentcaccaa9b2a645d1b9261aff743dfc96f05927071 (diff)
downloadsrc-93ef08af3ef1a9fb7a3af6b7212d3ca094e9aba6.tar.gz
src-93ef08af3ef1a9fb7a3af6b7212d3ca094e9aba6.zip
compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
Notes
Notes: svn path=/head/; revision=24348
Diffstat (limited to 'bin/ls')
-rw-r--r--bin/ls/ls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c
index 60bb05181cda..353914fda35a 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) {
/*