]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/commitdiff
ldpreload.h: Add missing unlikely() in DLSYM_FUNCTION().
authorSimon Ruderich <simon@ruderich.org>
Thu, 13 Jun 2013 14:46:48 +0000 (16:46 +0200)
committerSimon Ruderich <simon@ruderich.org>
Thu, 13 Jun 2013 19:44:55 +0000 (21:44 +0200)
src/ldpreload.h

index cc2dcee3c6c33d630ee085d8d8e52e7ab1a4b7a4..792679bb91d4fbf26ec17c18b239aa2e91f08979 100644 (file)
@@ -53,7 +53,7 @@ static void *dlsym_function(char const *name) {
 }
 
 #define DLSYM_FUNCTION(pointer, name) \
-    if (!(pointer)) { \
+    if (unlikely(!(pointer))) { \
         *(void **) (&(pointer)) = dlsym_function(name); \
     }