Original code incorrectly used a while() instead of a for() loop.
We need to iterate over the entire array here.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed May 30 23:29:03 CEST 2012 on sn-devel-104
(cherry picked from commit
fc7e1113c34819de6fc8053fb81ee2e0e970bec2)
*return_count = 0;
- while ( i < numdcs && (*return_count<numaddrs) ) {
+ for (i = 0; i < numdcs && (*return_count<numaddrs); i++ ) {
/* If we don't have an IP list for a name, lookup it up */
if (!dcs[i].ss_s) {
/* We need to get all IP addresses here. */