From: Simon Ruderich Date: Thu, 13 Jun 2013 14:46:48 +0000 (+0200) Subject: ldpreload.h: Add missing unlikely() in DLSYM_FUNCTION(). X-Git-Tag: 0.1~58 X-Git-Url: https://ruderich.org/simon/gitweb/?p=coloredstderr%2Fcoloredstderr.git;a=commitdiff_plain;h=7eb1667d410a7b3836542460f3b069b0866d7dab;hp=0ad5e4db04a913dc8c91167aa138f706fffd311c ldpreload.h: Add missing unlikely() in DLSYM_FUNCTION(). --- diff --git a/src/ldpreload.h b/src/ldpreload.h index cc2dcee..792679b 100644 --- a/src/ldpreload.h +++ b/src/ldpreload.h @@ -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); \ }