aboutsummaryrefslogtreecommitdiff
path: root/lib/init/del_svc_list.c
blob: ad624a8619937e3b53c65cec26df9a3c8e1443b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: ISC */
#include <stdlib.h>

#include "service.h"

void del_svc_list(service_list_t *list)
{
	service_t *svc;
	int i;

	for (i = 0; i < TGT_MAX; ++i) {
		while (list->targets[i] != NULL) {
			svc = list->targets[i];
			list->targets[i] = svc->next;

			delsvc(svc);
		}
	}
}