summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2011-02-17 20:01:21 +0100
committerStef Walter <stefw@collabora.co.uk>2011-02-17 20:07:38 +0100
commitc03b1023835887569315fbec6295be3cc0f4cf42 (patch)
tree17e0a73fa804f93f2c59aef85f71c0e7b1bbb6c8
parent14dfb79ca65dd80e117103c4f8852ae2b4a419a0 (diff)
Only allow colon between name and value.
-rw-r--r--module/conf.c4
-rw-r--r--tests/files/test-1.conf4
2 files changed, 4 insertions, 4 deletions
diff --git a/module/conf.c b/module/conf.c
index 1e0d565..6c83407 100644
--- a/module/conf.c
+++ b/module/conf.c
@@ -200,8 +200,8 @@ conf_parse_file (const char* filename, int flags,
if (!*name || *name == '#')
continue;
- /* Look for the break between name = value on the same line */
- value = name + strcspn (name, ":=");
+ /* Look for the break between name: value on the same line */
+ value = name + strcspn (name, ":");
if (!*value) {
errmsg (error_func, "%s: invalid config line: %s", filename, name);
errno = EINVAL;
diff --git a/tests/files/test-1.conf b/tests/files/test-1.conf
index 01193c6..d4ae0a1 100644
--- a/tests/files/test-1.conf
+++ b/tests/files/test-1.conf
@@ -1,5 +1,5 @@
-key1=value1
-with-whitespace = value-with-whitespace
+key1:value1
+with-whitespace : value-with-whitespace
with-colon: value-of-colon
# A comment