[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. debian/1.14.3-200-gb232f8a

Clint Adams schizo at debian.org
Tue Aug 23 13:06:25 UTC 2011


The following commit has been merged in the upstream branch:
commit e86e8167faf3e66c5d1e3c1b1172dd3aefd56efe
Author: Clint Adams <schizo at debian.org>
Date:   Tue Oct 27 01:11:41 2009 -0400

    Apply VMware patch: "Remove the unused 'done' variable in load_library_symbols(): the function can only be called once, so there is no need for the variable anyway."

diff --git a/libfakeroot.c b/libfakeroot.c
index b5a6515..6f67ef7 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -149,6 +149,7 @@ int fakeroot_disabled = 0;
 
 void load_library_symbols(void){
   /* this function loads all original functions from the C library.
+     This function is only called once.
      I ran into problems when  each function individually
      loaded it's original counterpart, as RTLD_NEXT seems to have
      a different meaning in files with different names than libtricks.c
@@ -160,17 +161,14 @@ void load_library_symbols(void){
      to this function. The other generated .h files do even more tricky
      things :) */
 
-  static int done=0;
   int i;
   const char *msg;
   
-  if(!done){
-    for(i=0; next_wrap[i].doit; i++){
-      *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name);
-      if ( (msg = dlerror()) != NULL){
-	fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
-/*	abort ();*/
-      }
+  for(i=0; next_wrap[i].doit; i++){
+    *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name);
+    if ( (msg = dlerror()) != NULL){
+      fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
+/*    abort ();*/
     }
   }
 }

-- 
fakeroot



More information about the Fakeroot-commits mailing list