summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pulsecore/ltdl-helper.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pulsecore/ltdl-helper.c b/src/pulsecore/ltdl-helper.c
index 0d4c22f8..ed0b63af 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;