From 3525e602d6bd32fe1ee11d03ce644fe6d250a290 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 4 Jun 2008 19:07:09 +0000 Subject: Use addu instead of another loop. --- src/librc/librc-depend.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c index 26fc5c41..f827efe8 100644 --- a/src/librc/librc-depend.c +++ b/src/librc/librc-depend.c @@ -774,7 +774,7 @@ rc_deptree_update(void) continue; if (strcmp(type, "config") == 0) { - rc_stringlist_add(config, depend); + rc_stringlist_addu(config, depend); continue; } @@ -891,11 +891,7 @@ rc_deptree_update(void) dt->services = rc_stringlist_new(); STAILQ_INSERT_TAIL(&di->depends, dt, entries); } - TAILQ_FOREACH(s2, dt->services, entries) - if (strcmp(s2->value, depinfo->service) == 0) - break; - if (!s2) - rc_stringlist_add(dt->services, depinfo->service); + rc_stringlist_addu(dt->services, depinfo->service); } } -- cgit v1.2.3