(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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user