Suspect expression in elf/dl-close.c

Andreas Schwab schwab@suse.de
Sat Apr 26 18:47:00 GMT 2003


The following line in elf/dl-close.c looks wrong:

  while (idx - disp > disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0)

I think it should rather be this:

  while (idx - disp > (disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0))

Andreas.

2003-04-26  Andreas Schwab  <schwab@suse.de>

	* elf/dl-close.c (remove_slotinfo): Fix missing parens.

--- elf/dl-close.c.~1.96.~	2003-04-25 14:15:34.000000000 +0200
+++ elf/dl-close.c	2003-04-26 20:14:45.000000000 +0200
@@ -80,7 +80,7 @@ remove_slotinfo (size_t idx, struct dtv_
 	return true;
     }
 
-  while (idx - disp > disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0)
+  while (idx - disp > (disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0))
     {
       --idx;
 



More information about the Libc-hacker mailing list