Use addu instead of another loop.

This commit is contained in:
Roy Marples 2008-06-04 19:07:09 +00:00
parent 79ebd89d19
commit 3525e602d6

View File

@ -774,7 +774,7 @@ rc_deptree_update(void)
continue; continue;
if (strcmp(type, "config") == 0) { if (strcmp(type, "config") == 0) {
rc_stringlist_add(config, depend); rc_stringlist_addu(config, depend);
continue; continue;
} }
@ -891,11 +891,7 @@ rc_deptree_update(void)
dt->services = rc_stringlist_new(); dt->services = rc_stringlist_new();
STAILQ_INSERT_TAIL(&di->depends, dt, entries); STAILQ_INSERT_TAIL(&di->depends, dt, entries);
} }
TAILQ_FOREACH(s2, dt->services, entries) rc_stringlist_addu(dt->services, depinfo->service);
if (strcmp(s2->value, depinfo->service) == 0)
break;
if (!s2)
rc_stringlist_add(dt->services, depinfo->service);
} }
} }