diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 17:46:17 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 17:46:17 +0000 |
commit | 8833066b122427710a9e14a888ce6cfa862332d3 (patch) | |
tree | 29591019d695919417b3698618d6a342e97381d6 /libio/genops.c | |
parent | fedca46896bdb702cb988837a0c2c5447e72ba2b (diff) | |
download | glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar.gz glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar.bz2 glibc-8833066b122427710a9e14a888ce6cfa862332d3.zip |
Updated to fedora-glibc-20070731T1624cvs/fedora-glibc-2_6_90-1
Diffstat (limited to 'libio/genops.c')
-rw-r--r-- | libio/genops.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libio/genops.c b/libio/genops.c index 3f8d71a50f..7005fdbd96 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -64,23 +64,29 @@ _IO_un_link (fp) { if (fp->file._flags & _IO_LINKED) { - struct _IO_FILE_plus **f; + struct _IO_FILE **f; #ifdef _IO_MTSAFE_IO _IO_cleanup_region_start_noarg (flush_cleanup); _IO_lock_lock (list_all_lock); run_fp = (_IO_FILE *) fp; _IO_flockfile ((_IO_FILE *) fp); #endif - for (f = &INTUSE(_IO_list_all); *f; - f = (struct _IO_FILE_plus **) &(*f)->file._chain) + if (INTUSE(_IO_list_all) == NULL) + ; + else if (fp == INTUSE(_IO_list_all)) { - if (*f == fp) + INTUSE(_IO_list_all) + = (struct _IO_FILE_plus *) INTUSE(_IO_list_all)->file._chain; + ++_IO_list_all_stamp; + } + else + for (f = &INTUSE(_IO_list_all)->file._chain; *f; f = &(*f)->_chain) + if (*f == (_IO_FILE *) fp) { - *f = (struct _IO_FILE_plus *) fp->file._chain; + *f = fp->file._chain; ++_IO_list_all_stamp; break; } - } fp->file._flags &= ~_IO_LINKED; #ifdef _IO_MTSAFE_IO _IO_funlockfile ((_IO_FILE *) fp); |