From 1979e47e99606d9794d4ccaeaf7684ef000aebb5 Mon Sep 17 00:00:00 2001 From: Florian Best Date: Thu, 23 Mar 2023 10:25:04 +0100 Subject: [PATCH] fix(UDL): fix comparsion with pointer value intead of memory address cache_entry.c: In function '_cache_entry_add_new_attribute': cache_entry.c:522:13: error: the comparison will always evaluate as 'true' for the address of 'name' will never be NULL [-Werror=address] 522 | if (!&attr->name) { | ^ In file included from cache_entry.c:46: cache_entry.h:53:15: note: 'name' declared here 53 | char *name; | ^~~~ cc1: all warnings being treated as errors Bug #56533 --- management/univention-directory-listener/src/cache_entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/management/univention-directory-listener/src/cache_entry.c b/management/univention-directory-listener/src/cache_entry.c index b8882b8b815..9072c5bb5fe 100644 --- a/management/univention-directory-listener/src/cache_entry.c +++ b/management/univention-directory-listener/src/cache_entry.c @@ -519,7 +519,7 @@ static CacheEntryAttribute *_cache_entry_add_new_attribute(CacheEntry *entry, LD entry->attributes = tmp; BER2STR(&ava->la_attr, &attr->name); - if (!&attr->name) { + if (!attr->name) { univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "%s:%d BER2STR() failed", __FILE__, __LINE__); goto error; }