diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-08-29 10:42:30 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-08-29 10:42:30 +0000 |
commit | c98d82db4c7fa8d94bcf8759f8f9ed622cc9b77f (patch) | |
tree | 7613124ead9a2e20487390fa7b421d4421355fe2 /stdio-common/vfprintf.c | |
parent | 69f8b5e8238659abddb2a7777eb33cbe6c5545d5 (diff) | |
download | glibc-c98d82db4c7fa8d94bcf8759f8f9ed622cc9b77f.tar.gz |
Update.
2002-08-29 Jakub Jelinek <jakub@redhat.com>
* stdio-common/vfprintf.c (vfprintf): Add builtin_expect for
string_malloced, it is unlikely to be set.
Only call free with non-NULL workspace.
* sysdeps/sparc/sparc32/sparcv9/Makefile (sysdep-CFLAGS): Use
-mcpu=ultrasparc, not only tune for it.
(ASFLAGS*): Set unconditionally.
2002-08-29 Jakub Jelinek <jakub@redhat.com>
* sysdeps/generic/readelflib.c (process_elf_file): Make loadaddr
ElfW(Addr). Don't mask upper 32-bits and lower 12 bits off from
p_vaddr/p_offset when computing loadaddr.
Diffstat (limited to 'stdio-common/vfprintf.c')
-rw-r--r-- | stdio-common/vfprintf.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index e59d6fbcd1..f181a0ae00 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -1084,7 +1084,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) outstring (string, len); \ if (left) \ PAD (L' '); \ - if (string_malloced) \ + if (__builin_expect (string_malloced, 0)) \ free (string); \ } \ break; @@ -1255,7 +1255,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) outstring (string, len); \ if (left) \ PAD (' '); \ - if (string_malloced) \ + if (__builtin_expect (string_malloced, 0)) \ free (string); \ } \ break; @@ -1595,7 +1595,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) /* The format is correctly handled. */ ++nspecs_done; - free (workstart); + if (__builtin_expect (workstart != NULL, 0)) + free (workstart); workstart = NULL; /* Look for next format specifier. */ @@ -1893,7 +1894,8 @@ do_positional: break; } - free (workstart); + if (__builtin_expect (workstart != NULL, 0)) + free (workstart); workstart = NULL; /* Write the following constant string. */ @@ -1904,7 +1906,8 @@ do_positional: } all_done: - free (workstart); + if (__builtin_expect (workstart != NULL, 0)) + free (workstart); /* Unlock the stream. */ #ifdef USE_IN_LIBIO _IO_funlockfile (s); |