aboutsummaryrefslogtreecommitdiff
path: root/src/env-update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/env-update.c')
-rw-r--r--src/env-update.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/env-update.c b/src/env-update.c
index 00feb282..909264d2 100644
--- a/src/env-update.c
+++ b/src/env-update.c
@@ -95,7 +95,6 @@ int env_update (int argc, char **argv)
bool ld = true;
char *ldent;
char **ldents = NULL;
- int nents = 0;
char **config = NULL;
char *entry;
char **mycolons = NULL;
@@ -287,7 +286,6 @@ int env_update (int argc, char **argv)
continue;
ldents = rc_strlist_addu (ldents, file);
- nents++;
}
if (ldconfig) {
@@ -295,7 +293,12 @@ int env_update (int argc, char **argv)
if (rc_exists (LDSOCONF)) {
char **lines = rc_get_list (NULL, LDSOCONF);
char *line;
+ int nents = 0;
ld = false;
+
+ STRLIST_FOREACH (ldents, line, i)
+ nents ++;
+
STRLIST_FOREACH (lines, line, i)
if (i > nents || strcmp (line, ldents[i - 1]) != 0)
{