From 302ec18201b75c787f4923be0e37676be0af7ccb Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 1 Jan 2012 18:24:58 +0100 Subject: [PATCH] isl_arg_parse: reset all flags with same option name whenever a flag is set Otherwise, there is no way to turn off a flag that is set by default. Signed-off-by: Sven Verdoolaege --- isl_arg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isl_arg.c b/isl_arg.c index 6961a07..fe9aa46 100644 --- a/isl_arg.c +++ b/isl_arg.c @@ -779,7 +779,7 @@ static int parse_flags_option(struct isl_arg *decl, char **arg, if (!has_argument) flags = arg[1]; - val = *(unsigned *)(((char *)opt) + decl->offset); + val = 0; while ((comma = strchr(flags, ',')) != NULL) { if (!set_flag(decl, &val, flags, comma - flags)) -- 2.7.4