X-Git-Url: https://ruderich.org/simon/gitweb/?p=coloredstderr%2Fcoloredstderr.git;a=blobdiff_plain;f=src%2Fldpreload.h;h=af416b39dd9f4c4ef23611410d0a1a951965d1c4;hp=cc2dcee3c6c33d630ee085d8d8e52e7ab1a4b7a4;hb=8a65b4486febf00e3fad5bafc3773a811e675a4c;hpb=b75b0ec399b1217568e08e567afdefaea0bd32ef diff --git a/src/ldpreload.h b/src/ldpreload.h index cc2dcee..af416b3 100644 --- a/src/ldpreload.h +++ b/src/ldpreload.h @@ -2,7 +2,7 @@ * Helper header for LD_PRELOAD related headers macros. Must be loaded _first_ * (for RTLD_NEXT)! * - * Copyright (C) 2012-2013 Simon Ruderich + * Copyright (C) 2012-2015 Simon Ruderich * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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); \ }