]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-settings: Give a better error message for invalid boolean values
authorTimo Sirainen <tss@iki.fi>
Tue, 14 Sep 2010 13:45:01 +0000 (14:45 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 14 Sep 2010 13:45:01 +0000 (14:45 +0100)
src/lib-settings/settings-parser.c

index 5f43a219fd8734cd6aa17bcd0794f96ceb28ad82..55f0359857a8a44b34df9b0e0b843c7f63d291c1 100644 (file)
@@ -298,8 +298,8 @@ get_bool(struct setting_parser_context *ctx, const char *value, bool *result_r)
        else if (strcasecmp(value, "no") == 0)
                *result_r = FALSE;
        else {
-               ctx->error = p_strconcat(ctx->parser_pool, "Invalid boolean: ",
-                                        value, NULL);
+               ctx->error = p_strdup_printf(ctx->parser_pool,
+                       "Invalid boolean value: %s (use yes or no)", value);
                return -1;
        }