From bb5fd5ce64b598085bdb8a05cb53777480fe093c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 9 Oct 2020 10:13:14 +0200 Subject: elf: Do not pass GLRO(dl_platform), GLRO(dl_platformlen) to _dl_important_hwcaps In the current code, the function can easily obtain the information on its own. Reviewed-by: Adhemerval Zanella --- elf/dl-hwcaps.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'elf/dl-hwcaps.c') diff --git a/elf/dl-hwcaps.c b/elf/dl-hwcaps.c index 6df9efb..44dbac0 100644 --- a/elf/dl-hwcaps.c +++ b/elf/dl-hwcaps.c @@ -28,13 +28,12 @@ /* Return an array of useful/necessary hardware capability names. */ const struct r_strlenpair * -_dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz, - size_t *max_capstrlen) +_dl_important_hwcaps (size_t *sz, size_t *max_capstrlen) { uint64_t hwcap_mask = GET_HWCAP_MASK(); /* Determine how many important bits are set. */ uint64_t masked = GLRO(dl_hwcap) & hwcap_mask; - size_t cnt = platform != NULL; + size_t cnt = GLRO (dl_platform) != NULL; size_t n, m; size_t total; struct r_strlenpair *result; @@ -60,10 +59,10 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz, masked ^= 1ULL << n; ++m; } - if (platform != NULL) + if (GLRO (dl_platform) != NULL) { - temp[m].str = platform; - temp[m].len = platform_len; + temp[m].str = GLRO (dl_platform); + temp[m].len = GLRO (dl_platformlen); ++m; } -- cgit v1.1