Only allow colon between name and value.
authorStef Walter <stefw@collabora.co.uk>
Thu, 17 Feb 2011 19:01:21 +0000 (20:01 +0100)
committerStef Walter <stefw@collabora.co.uk>
Thu, 17 Feb 2011 19:07:38 +0000 (20:07 +0100)
module/conf.c
tests/files/test-1.conf

index 1e0d5657019695ba074883f134230574da8f6fcf..6c83407a62fc68d2e3f3f590e5eec6555b64d8b1 100644 (file)
@@ -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;
index 01193c6bf77d0146cd2652f5b35842c9341ea073..d4ae0a1ad845ddcd6c79e9ba0eaae5764c33f6c8 100644 (file)
@@ -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