From 0b29b91f6fcdb9b0047c8581283567c62fd2434a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Fri, 14 Apr 2006 13:56:00 +0000 Subject: [PATCH] (dns_srv_order): change a if (ptr == NULL) continue into a assert(ptr != NULL) since it could never happen, found by the IBM code checker (beam). Thanks to Florian Krohm for explaining it. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17063 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/resolve.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/roken/resolve.c b/lib/roken/resolve.c index 4e0bb26c5..eb8b1c2f6 100644 --- a/lib/roken/resolve.c +++ b/lib/roken/resolve.c @@ -647,8 +647,7 @@ dns_srv_order(struct dns_reply *r) /* find the last record with the same priority and count the sum of all weights */ for(sum = 0, tt = ss; tt < srvs + num_srv; tt++) { - if(*tt == NULL) - continue; + assert(*tt != NULL); if((*tt)->u.srv->priority != (*ss)->u.srv->priority) break; sum += (*tt)->u.srv->weight;