From: Lennart Poettering Date: Sun, 1 Feb 2009 23:20:57 +0000 (+0100) Subject: work around dlsym() return value mistyping as suggested in POSIX X-Git-Tag: 1.0_branch~2238 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0fd99b911eb3a7ca5590f0d7504f181a6f8c0f4;p=profile%2Fivi%2Fpulseaudio.git work around dlsym() return value mistyping as suggested in POSIX --- diff --git a/src/pulsecore/ltdl-helper.c b/src/pulsecore/ltdl-helper.c index 0d4c22f..ed0b63a 100644 --- a/src/pulsecore/ltdl-helper.c +++ b/src/pulsecore/ltdl-helper.c @@ -42,7 +42,9 @@ pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *s pa_assert(handle); pa_assert(symbol); - if ((f = ((pa_void_func_t) (size_t) lt_dlsym(handle, symbol)))) + *(void**) &f = lt_dlsym(handle, symbol); + + if (f) return f; if (!module) @@ -57,7 +59,7 @@ pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *s if (!isalnum(*c)) *c = '_'; - f = (pa_void_func_t) (size_t) lt_dlsym(handle, sn); + *(void**) &f = lt_dlsym(handle, sn); pa_xfree(sn); return f;