This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] elf/cache.c: Fix incorrect condition


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]