From: Ulrich Drepper Date: Tue, 24 Aug 1999 23:12:15 +0000 (+0000) Subject: (_IO_file_is_open): Only check for -1, not all negative numbers. X-Git-Tag: cvs/glibc_2-1-2~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0762715c25fead1f7713ec87c90cc2418d38f0dc;p=thirdparty%2Fglibc.git (_IO_file_is_open): Only check for -1, not all negative numbers. --- diff --git a/libio/libioP.h b/libio/libioP.h index a9577cec74f..5bf1a6d0886 100644 --- a/libio/libioP.h +++ b/libio/libioP.h @@ -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,