[6.0] 9980a67d6 umem: suncc happyness, set fptrs NULL in mgmt

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Aug 16 08:52:34 UTC 2018


commit 9980a67d611ac58d798c137948f6634ee0b655db
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 db8178ab8..e36693974 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