Re: [PATCH] : Inversion for options

From: Aleksandar Lazic <al-haproxy#none.at>
Date: Wed, 26 Dec 2007 00:15:04 +0100


Hi,

On Die 25.12.2007 04:49, Krzysztof Oledzki wrote:

>diff --git a/include/common/cfgparse.h b/include/common/cfgparse.h

[snipp]

>-int cfg_parse_listen(const char *file, int linenum, char **args)
>+int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
> {
> static struct proxy *curproxy = NULL;
> struct server *newsrv = NULL;
>@@ -1145,8 +1145,8 @@ int cfg_parse_listen(const char *file, int linenum, char **args)
> else if (!strcmp(args[0], "option")) {
> int optnum;
>
>- if (*(args[1]) == 0) {
>- Alert("parsing [%s:%d] : '%s' expects an option name.\n", file, linenum, args[0]);
>+ if (*(args[1]) == '\0') {
>+ Alert("parsing [%s:%d]: expected option name.\n", file, linenum);
> return -1;
> }
>

I think the %s will help to know which command expected a option, IMHO.

Cheers

Aleks Received on 2007/12/26 00:15

This archive was generated by hypermail 2.2.0 : 2007/12/26 00:30 CET