mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
* locale/programs/ld-monetary.c (monetary_finish): Avoid range check
for int_frac_digits and frac_digits. * login/logout.c (logout): Avoid aliasing violation. * login/logwtmp.c (logwtmp): Likewise. * libio/genops.c (_IO_un_link): Avoid aliasing violation.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user