]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_IO_file_is_open): Only check for -1, not all negative numbers.
authorUlrich Drepper <drepper@redhat.com>
Tue, 24 Aug 1999 23:12:15 +0000 (23:12 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 24 Aug 1999 23:12:15 +0000 (23:12 +0000)
libio/libioP.h

index a9577cec74f36ec08f29730e3d6c2c285e7f26da..5bf1a6d08865a0c5d0512cd519abc89b5dc12c33 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU IO Library.
 
    This library is free software; you can redistribute it and/or
@@ -375,7 +375,7 @@ extern int _IO_file_stat __P ((_IO_FILE *, void *));
 extern int _IO_file_close __P ((_IO_FILE *));
 extern int _IO_file_underflow __P ((_IO_FILE *));
 extern int _IO_file_overflow __P ((_IO_FILE *, int));
-#define _IO_file_is_open(__fp) ((__fp)->_fileno >= 0)
+#define _IO_file_is_open(__fp) ((__fp)->_fileno != -1)
 extern void _IO_file_init __P ((_IO_FILE *));
 extern _IO_FILE* _IO_file_attach __P ((_IO_FILE *, int));
 extern _IO_FILE* _IO_file_open __P ((_IO_FILE *, const char *, int, int,