1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <stdlib.h> #include "service.h" void del_srv_list(service_list_t *list) { service_t *srv; int i; for (i = 0; i < TGT_MAX; ++i) { while (list->targets[i] != NULL) { srv = list->targets[i]; list->targets[i] = srv->next; delsrv(srv); } } }