(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
This commit is contained in:
Love Hörnquist Åstrand
2006-04-14 13:56:00 +00:00
parent abd7e5ec1c
commit 0b29b91f6f

View File

@@ -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;