STABLE14-h-enumerate-r-fix-for-real-20060116

FIXES 24196

make this not simply wrong


(cherry picked from commit 93e1cee7046984a81f0339484713649aceb25f3a)
This commit is contained in:
Chaskiel M Grundman 2006-01-16 21:16:33 +00:00 committed by Derrick Brashear
parent 26c7361f2b
commit 85edef5b61

View File

@ -902,8 +902,8 @@ h_Enumerate_r(int (*proc) (), struct host *enumstart, char *param)
if (hostCount == 0) { if (hostCount == 0) {
return; return;
} }
if (!(held = h_Held_r(host))) if (enumstart && !(held = h_Held_r(enumstart)))
h_Hold_r(host); h_Hold_r(enumstart);
for (host = enumstart; host; host = next, held = nheld) { for (host = enumstart; host; host = next, held = nheld) {
held = (*proc) (host, held, param); held = (*proc) (host, held, param);
next = host->next; next = host->next;