aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-06-04 19:00:46 +0000
committerRoy Marples <roy@marples.name>2008-06-04 19:00:46 +0000
commit79ebd89d19c2bece426e16cfddf79d642854aeb5 (patch)
treee472b87d4a86171784068f6a3272eab195fd844f /src/librc
parentba8008fb0548a010e9ad760c3d9f34e789a51abe (diff)
Only add a backreference if it doesn't already exist.
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/librc-depend.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c
index a4ac6535..26fc5c41 100644
--- a/src/librc/librc-depend.c
+++ b/src/librc/librc-depend.c
@@ -891,7 +891,11 @@ rc_deptree_update(void)
dt->services = rc_stringlist_new();
STAILQ_INSERT_TAIL(&di->depends, dt, entries);
}
- rc_stringlist_add(dt->services, depinfo->service);
+ TAILQ_FOREACH(s2, dt->services, entries)
+ if (strcmp(s2->value, depinfo->service) == 0)
+ break;
+ if (!s2)
+ rc_stringlist_add(dt->services, depinfo->service);
}
}