[master] 6285c39 umem: suncc happyness, set fptrs NULL in mgmt
Nils Goroll
nils.goroll at uplex.de
Thu Apr 5 08:53:10 UTC 2018
commit 6285c390f915fbc928a1ebf16ada0afeb730048f
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Thu Apr 5 10:52:16 2018 +0200
umem: suncc happyness, set fptrs NULL in mgmt
diff --git a/bin/varnishd/storage/storage_umem.c b/bin/varnishd/storage/storage_umem.c
index db8178a..e366939 100644
--- a/bin/varnishd/storage/storage_umem.c
+++ b/bin/varnishd/storage/storage_umem.c
@@ -329,9 +329,11 @@ smu_init(struct stevedore *parent, int ac, char * const *av)
#define DLSYM_UMEM(fptr,sym) \
do { \
(void) dlerror(); \
- if ((fptr = dlsym(libumem_hndl, #sym)) == NULL) \
- ARGV_ERR("(-sumem) cannot find symbol " #sym ": %s", \
- dlerror()); \
+ if (dlsym(libumem_hndl, #sym) == NULL) \
+ ARGV_ERR("(-sumem) cannot find symbol " \
+ #sym ": %s", \
+ dlerror()); \
+ fptr = NULL; \
} while(0)
DLSYM_UMEM(umem_allocf, umem_alloc);
@@ -372,7 +374,7 @@ smu_open_init(void)
#define DLSYM_UMEM(fptr,sym) \
do { \
- fptr = dlsym(libumem_hndl, #sym); \
+ fptr = (sym ## _f) dlsym(libumem_hndl, #sym); \
AN(fptr); \
} while(0)
More information about the varnish-commit
mailing list