]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Simplify the code to get the function entry + avoids too many casts
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 17 Jul 2014 21:23:09 +0000 (21:23 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 17 Jul 2014 21:23:09 +0000 (21:23 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14174

coregrind/vg_preloaded.c

index eaf6272778ae6b10b328f2728526ddb25bcc89bb..fe8b50a33074f83ecec7e5d4aee64575d154ac7c 100644 (file)
@@ -86,9 +86,10 @@ void * VG_NOTIFY_ON_LOAD(ifunc_wrapper) (void)
 #if defined(VGP_ppc64_linux)
    /* ppc64 uses function descriptors, so get the actual function entry
       address for the client request, but return the function descriptor
-      from this function. */
-    UWord *descr = (UWord*)(void*)result;
-    fnentry = (Addr)(void*)(descr[0]);
+      from this function. 
+      result points to the function descriptor, which starts with the
+      function entry. */
+    fnentry = *(Addr*)result;
 #else
     fnentry = result;
 #endif