mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
* Makerules ($(common-objpfx)shlib.lds): Don't use \n in rhs of sed
substitutions; the semicolon terminators are enough for ld anyway. * elf/dl-deps.c (_dl_map_object_deps): Use alloca instead of dynamically sized auto array in function already using alloca. * locale/programs/ld-ctype.c (ctype_output): Likewise. * locale/programs/ld-time.c (time_output): Likewise. * elf/dl-misc.c (_dl_debug_vdprintf): Use macro instead of const for IOV array size. * locale/programs/charmap.c (charmap_read): Avoid alloca (or strdupa) when also using dynamically-sized auto array. * locale/programs/locfile.c (locfile_read): Likewise. * locale/programs/repertoire.c (repertoire_read): Likewise. * nis/nis_print_group_entry.c (nis_print_group_entry): Likewise. * locale/programs/locarchive.c (enlarge_archive): Likewise. * posix/annexc.c (check_header): Likewise. * iconv/gconv_int.h (norm_add_slashes): Don't handle null SUFFIX. strlen ("") gets optimized away just as well. * intl/loadmsgcat.c (_nl_init_domain_conv): Update caller. * wcsmbs/wcsmbsload.c (__wcsmbs_load_conv): Likewise.
This commit is contained in:
@ -88,8 +88,8 @@ _dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
|
||||
static void
|
||||
_dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
|
||||
{
|
||||
const int niovmax = 64;
|
||||
struct iovec iov[niovmax];
|
||||
# define NIOVMAX 64
|
||||
struct iovec iov[NIOVMAX];
|
||||
int niov = 0;
|
||||
pid_t pid = 0;
|
||||
char pidbuf[12];
|
||||
@ -115,7 +115,7 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
|
||||
}
|
||||
|
||||
/* Append to the output. */
|
||||
assert (niov < niovmax);
|
||||
assert (niov < NIOVMAX);
|
||||
iov[niov].iov_len = 12;
|
||||
iov[niov++].iov_base = pidbuf;
|
||||
|
||||
@ -128,7 +128,7 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
|
||||
++fmt;
|
||||
|
||||
/* Append constant string. */
|
||||
assert (niov < niovmax);
|
||||
assert (niov < NIOVMAX);
|
||||
if ((iov[niov].iov_len = fmt - startp) != 0)
|
||||
iov[niov++].iov_base = (char *) startp;
|
||||
|
||||
|
Reference in New Issue
Block a user