summaryrefslogtreecommitdiff
path: root/src/librc/librc-misc.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-10 23:22:46 +0000
committerRoy Marples <roy@marples.name>2008-01-10 23:22:46 +0000
commit2d95c9a756c4c7b9301e04c274c3b139e0d1aef4 (patch)
tree4bd58fa2b4b8e01f5df1352ce7d06effe719b441 /src/librc/librc-misc.c
parent5aea880f8158945d2cc9390891de6af8ca0a9b28 (diff)
downloadopenrc-2d95c9a756c4c7b9301e04c274c3b139e0d1aef4.tar.gz
openrc-2d95c9a756c4c7b9301e04c274c3b139e0d1aef4.tar.bz2
openrc-2d95c9a756c4c7b9301e04c274c3b139e0d1aef4.tar.xz
Loads of NetBSD tweaks here.
Diffstat (limited to 'src/librc/librc-misc.c')
-rw-r--r--src/librc/librc-misc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/librc/librc-misc.c b/src/librc/librc-misc.c
index 4a16e9f..08f5e4e 100644
--- a/src/librc/librc-misc.c
+++ b/src/librc/librc-misc.c
@@ -151,11 +151,14 @@ char **rc_config_list (const char *file)
/* Get entry - we do not want comments */
token = strsep (&p, "#");
if (token && (strlen (token) > 1)) {
- /* Stip the newline if present */
- if (token[strlen (token) - 1] == '\n')
- token[strlen (token) - 1] = 0;
+ /* If not variable assignment then skip */
+ if (strchr (token, '=')) {
+ /* Stip the newline if present */
+ if (token[strlen (token) - 1] == '\n')
+ token[strlen (token) - 1] = 0;
- rc_strlist_add (&list, token);
+ rc_strlist_add (&list, token);
+ }
}
free (buffer);
}