From 238b64b541d9c37a59a291980e07f0b5d9d9826b Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 23 Jan 2017 18:23:42 +0200 Subject: Add wider OpenGL coverage, more cleanups, etc.. Testing with some GLES 2.0 programs that I have made so I can profile this thing. --- hooks.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'hooks.h') diff --git a/hooks.h b/hooks.h index b844fcd..6d91b8e 100644 --- a/hooks.h +++ b/hooks.h @@ -134,8 +134,8 @@ hook_function(void **ptr, const char *name, const bool versioned) return; if (versioned) { - const char *versions[] = { "GLIBC_2.0", "GLIBC_2.2.5", NULL }; - for (size_t i = 0; !*ptr && versions[i]; ++i) + const char *versions[] = { "GLIBC_2.0", "GLIBC_2.2.5" }; + for (size_t i = 0; !*ptr && i < ARRAY_SIZE(versions); ++i) *ptr = dlvsym(RTLD_NEXT, name, versions[i]); } else { HOOK_DLSYM(dlsym); @@ -158,5 +158,3 @@ dlsym(void *handle, const char *symbol) return store_real_symbol_and_return_fake_symbol(symbol, _dlsym(handle, symbol)); } - -#undef HOOK_DLSYM -- cgit v1.2.3