mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-10 05:03:06 +03:00
Update.
* elf/dl-profile.c (_dl_start_profile): Help the compiler to avoid strncpy if possible.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2002-02-02 Ulrich Drepper <drepper@redhat.com>
|
2002-02-02 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* elf/dl-profile.c (_dl_start_profile): Help the compiler to avoid
|
||||||
|
strncpy if possible.
|
||||||
|
|
||||||
* sysdeps/generic/dl-environ.c (unsetenv): Optimize. Don't use
|
* sysdeps/generic/dl-environ.c (unsetenv): Optimize. Don't use
|
||||||
strncmp.
|
strncmp.
|
||||||
* elf/dl-load.c (is_dst): Optimize. Don't call strncmp twice.
|
* elf/dl-load.c (is_dst): Optimize. Don't call strncmp twice.
|
||||||
|
@@ -244,7 +244,10 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
|
|||||||
*(char **) hist_hdr.high_pc = (char *) mapend;
|
*(char **) hist_hdr.high_pc = (char *) mapend;
|
||||||
*(int32_t *) hist_hdr.hist_size = kcountsize / sizeof (HISTCOUNTER);
|
*(int32_t *) hist_hdr.hist_size = kcountsize / sizeof (HISTCOUNTER);
|
||||||
*(int32_t *) hist_hdr.prof_rate = __profile_frequency ();
|
*(int32_t *) hist_hdr.prof_rate = __profile_frequency ();
|
||||||
strncpy (hist_hdr.dimen, "seconds", sizeof (hist_hdr.dimen));
|
if (sizeof (hist_hdr.dimen) >= sizeof ("seconds"))
|
||||||
|
memcpy (hist_hdr.dimen, "seconds", sizeof ("seconds"));
|
||||||
|
else
|
||||||
|
strncpy (hist_hdr.dimen, "seconds", sizeof (hist_hdr.dimen));
|
||||||
hist_hdr.dimen_abbrev = 's';
|
hist_hdr.dimen_abbrev = 's';
|
||||||
|
|
||||||
/* First determine the output name. We write in the directory
|
/* First determine the output name. We write in the directory
|
||||||
|
Reference in New Issue
Block a user