From: Ian Jackson Date: Tue, 5 May 2026 17:04:59 +0000 (+0100) Subject: Remove a pointless test of an array for NULL X-Git-Tag: adns-1.6.2~9 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=55d1203eb142093ff9bae604190d7513a6619370;p=adns.git 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] --- 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); }