summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de1e088)
raw | patch | inline | side by side (parent: de1e088)
author | Max Kellermann <max@duempel.org> | |
Fri, 8 Nov 2013 18:35:04 +0000 (19:35 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 8 Nov 2013 18:35:04 +0000 (19:35 +0100) |
src/conf.c | patch | blob | history |
diff --git a/src/conf.c b/src/conf.c
index f9b6918e3df70cce1ba7ac5d0f5e717c6f4328bf..0166f6fd6b6c18ddf8a82d713412d49612a2e01b 100644 (file)
--- a/src/conf.c
+++ b/src/conf.c
size_t len = strlen(line), i = 0, j = 0;
char name[MAX_LINE_LENGTH];
char value[MAX_LINE_LENGTH];
- bool match_found;
/* get the name part */
while (i < len && line[i] != '=' && !g_ascii_isspace(line[i]))
value[j++] = line[i++];
value[j] = '\0';
- match_found = true;
-
/* key definition */
if (!strcasecmp(CONF_KEY_DEFINITION, name))
parse_key_definition(value);
#else
options.second_column = str2bool(value);
#endif
- else
- match_found = false;
-
- if (!match_found)
+ else {
print_error(_("Unknown configuration parameter"), name);
+ return false;
+ }
- return match_found;
+ return true;
}
static int