From fea6cc4a20c98a3abf53223c0ffaa3104b66f56c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 18 Jul 2010 15:14:25 +0200 Subject: Remove undefined operations --- ChangeLog | 11 +++++++++++ debug/vdprintf_chk.c | 8 ++++---- libio/iofdopen.c | 5 ++--- libio/iofopncook.c | 5 ++--- libio/iovdprintf.c | 8 ++++---- libio/oldiofdopen.c | 5 ++--- sysdeps/powerpc/powerpc64/dl-machine.h | 6 ++---- 7 files changed, 27 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 37579f52bb..29c0c032c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-07-18 Andreas Schwab + + * debug/vdprintf_chk.c (__vdprintf_chk): Remove undefined + operation. + * libio/iofdopen.c (_IO_new_fdopen): Likewise. + * libio/iofopncook.c (_IO_cookie_init): Likewise. + * libio/iovdprintf.c (_IO_vdprintf): Likewise. + * libio/oldiofdopen.c (_IO_old_fdopen): Likewise. + * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): + Likewise. + 2010-07-09 Ulrich Drepper * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Use __fcntl not diff --git a/debug/vdprintf_chk.c b/debug/vdprintf_chk.c index 8f3d332a40..e65fbe802c 100644 --- a/debug/vdprintf_chk.c +++ b/debug/vdprintf_chk.c @@ -50,10 +50,10 @@ __vdprintf_chk (int d, int flags, const char *format, va_list arg) INTUSE(_IO_un_link) (&tmpfil); return EOF; } - tmpfil.file._IO_file_flags = - (_IO_mask_flags (&tmpfil.file, _IO_NO_READS, - _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING) - | _IO_DELETE_DONT_CLOSE); + tmpfil.file._flags |= _IO_DELETE_DONT_CLOSE; + + _IO_mask_flags (&tmpfil.file, _IO_NO_READS, + _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); /* For flags > 0 (i.e. __USE_FORTIFY_LEVEL > 1) request that %n can only come from read-only format strings. */ diff --git a/libio/iofdopen.c b/libio/iofdopen.c index 0c449ed75b..85430450f5 100644 --- a/libio/iofdopen.c +++ b/libio/iofdopen.c @@ -172,9 +172,8 @@ _IO_new_fdopen (fd, mode) } new_f->fp.file._flags &= ~_IO_DELETE_DONT_CLOSE; - new_f->fp.file._IO_file_flags = - _IO_mask_flags (&new_f->fp.file, read_write, - _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); + _IO_mask_flags (&new_f->fp.file, read_write, + _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); return &new_f->fp.file; } diff --git a/libio/iofopncook.c b/libio/iofopncook.c index 976ff5093a..b06429d769 100644 --- a/libio/iofopncook.c +++ b/libio/iofopncook.c @@ -154,9 +154,8 @@ _IO_cookie_init (struct _IO_cookie_file *cfile, int read_write, INTUSE(_IO_file_init) (&cfile->__fp); - cfile->__fp.file._IO_file_flags = - _IO_mask_flags (&cfile->__fp.file, read_write, - _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); + _IO_mask_flags (&cfile->__fp.file, read_write, + _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); /* We use a negative number different from -1 for _fileno to mark that this special stream is not associated with a real file, but still has diff --git a/libio/iovdprintf.c b/libio/iovdprintf.c index 5284ff8938..fb4a838a53 100644 --- a/libio/iovdprintf.c +++ b/libio/iovdprintf.c @@ -53,10 +53,10 @@ _IO_vdprintf (d, format, arg) INTUSE(_IO_un_link) (&tmpfil); return EOF; } - tmpfil.file._IO_file_flags = - (_IO_mask_flags (&tmpfil.file, _IO_NO_READS, - _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING) - | _IO_DELETE_DONT_CLOSE); + tmpfil.file._flags |= _IO_DELETE_DONT_CLOSE; + + _IO_mask_flags (&tmpfil.file, _IO_NO_READS, + _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); done = INTUSE(_IO_vfprintf) (&tmpfil.file, format, arg); diff --git a/libio/oldiofdopen.c b/libio/oldiofdopen.c index c616b387fa..a1fc6675a4 100644 --- a/libio/oldiofdopen.c +++ b/libio/oldiofdopen.c @@ -130,9 +130,8 @@ _IO_old_fdopen (fd, mode) } new_f->fp.file._file._flags &= ~_IO_DELETE_DONT_CLOSE; - new_f->fp.file._file._IO_file_flags = - _IO_mask_flags (&new_f->fp.file._file, read_write, - _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); + _IO_mask_flags (&new_f->fp.file._file, read_write, + _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING); return (_IO_FILE *) &new_f->fp; } diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h index 00888587af..0892b1d9df 100644 --- a/sysdeps/powerpc/powerpc64/dl-machine.h +++ b/sysdeps/powerpc/powerpc64/dl-machine.h @@ -641,16 +641,14 @@ elf_machine_rela (struct link_map *map, value = elf_machine_tprel (map, sym_map, sym, reloc); if (dont_expect ((value & 3) != 0)) _dl_reloc_overflow (map, "R_PPC64_TPREL16_LO_DS", reloc_addr, refsym); - *(Elf64_Half *) reloc_addr = BIT_INSERT (*(Elf64_Half *) reloc_addr, - value, 0xfffc); + BIT_INSERT (*(Elf64_Half *) reloc_addr, value, 0xfffc); break; case R_PPC64_TPREL16_DS: value = elf_machine_tprel (map, sym_map, sym, reloc); if (dont_expect ((value + 0x8000) >= 0x10000 || (value & 3) != 0)) _dl_reloc_overflow (map, "R_PPC64_TPREL16_DS", reloc_addr, refsym); - *(Elf64_Half *) reloc_addr = BIT_INSERT (*(Elf64_Half *) reloc_addr, - value, 0xfffc); + BIT_INSERT (*(Elf64_Half *) reloc_addr, value, 0xfffc); break; case R_PPC64_TPREL16: -- cgit v1.2.3-65-gdbad