From 55d1203eb142093ff9bae604190d7513a6619370 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 5 May 2026 18:04:59 +0100 Subject: [PATCH] Remove a pointless test of an array for NULL Fixes this harmless warning: ../src/types.c:459:7: warning: the comparison will always evaluate as 'true' for the address of 'sortlist' will never be NULL [-Waddress] --- changelog | 1 + src/types.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog b/changelog index ad2b618..073db37 100644 --- a/changelog +++ b/changelog @@ -2,6 +2,7 @@ adns (1.6.2) UPSTREAM; urgency=low * Disable debugging output to stderr from adns_addr2text and adns_text2addr. + * Fix a harmelss compiler warning about sortlist never being NULL. -- diff --git a/src/types.c b/src/types.c index d79f4a0..03f8d07 100644 --- a/src/types.c +++ b/src/types.c @@ -456,7 +456,6 @@ static int search_sortlist_sa(adns_state ads, const struct sockaddr *sa) { static int dip_sockaddr(adns_state ads, const struct sockaddr *sa, const struct sockaddr *sb) { - if (!ads->sortlist) return 0; return search_sortlist_sa(ads, sa) > search_sortlist_sa(ads, sb); } -- 2.30.2