libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 57/57] Assign `func' just once in Ltest-nocallo


From: Tommi Rantala
Subject: [Libunwind-devel] [PATCH 57/57] Assign `func' just once in Ltest-nocalloc glibc case
Date: Fri, 21 Sep 2012 14:11:58 +0300

---
 tests/Ltest-nocalloc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/Ltest-nocalloc.c b/tests/Ltest-nocalloc.c
index fb0c981..f5c31b2 100644
--- a/tests/Ltest-nocalloc.c
+++ b/tests/Ltest-nocalloc.c
@@ -47,7 +47,8 @@ calloc(size_t n, size_t s)
      causes infinite recursion.  Instead, we simply use it by its other
      name.  */
   extern void *__libc_calloc(size_t, size_t);
-  func = &__libc_calloc;
+  if (!func)
+    func = &__libc_calloc;
 #else
   if(!func)
     func = dlsym(RTLD_NEXT, "calloc");
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]