]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - dlfcn/dlmopen.c
Use glibc_likely instead __builtin_expect.
[thirdparty/glibc.git] / dlfcn / dlmopen.c
index 1e2cbcfdb492752f327fe61884501a185679e4d0..115f6e9e28416903f1509a5f4e43f6bbe07182dc 100644 (file)
@@ -64,7 +64,7 @@ dlmopen_doit (void *a)
 
       /* It makes no sense to use RTLD_GLOBAL when loading a DSO into
         a namespace other than the base namespace.  */
-      if (__builtin_expect (args->mode & RTLD_GLOBAL, 0))
+      if (__glibc_unlikely (args->mode & RTLD_GLOBAL))
        GLRO(dl_signal_error) (EINVAL, NULL, NULL, N_("invalid mode"));
     }
 
@@ -79,7 +79,7 @@ void *
 __dlmopen (Lmid_t nsid, const char *file, int mode DL_CALLER_DECL)
 {
 # ifdef SHARED
-  if (__builtin_expect (_dlfcn_hook != NULL, 0))
+  if (__glibc_unlikely (_dlfcn_hook != NULL))
     return _dlfcn_hook->dlmopen (nsid, file, mode, RETURN_ADDRESS (0));
 # endif