[PATCH] elf/cache.c: Fix incorrect condition
Marek Polacek
mpolacek@redhat.com
Fri Jul 15 13:53:00 GMT 2011
In `load_aux_cache' we check if aux_cache->nlibs < 0, but since
`nlibs' is of type uint32_t, this is never the case. So we may
omit this condition.
2011-07-15 Marek Polacek <mpolacek@redhat.com>
* elf/cache.c (load_aux_cache): Remove incorrect condition of
"aux_cache->nlibs < 0".
--- libc/elf/cache.c.mp 2011-07-15 11:21:22.586796760 +0200
+++ libc/elf/cache.c 2011-07-15 13:20:02.784797957 +0200
@@ -675,7 +675,6 @@ load_aux_cache (const char *aux_cache_na
if (aux_cache == MAP_FAILED
|| aux_cache_size < sizeof (struct aux_cache_file)
|| memcmp (aux_cache->magic, AUX_CACHEMAGIC, sizeof AUX_CACHEMAGIC - 1)
- || aux_cache->nlibs < 0
|| aux_cache->nlibs >= aux_cache_size)
{
close (fd);
More information about the Libc-alpha
mailing list