From: Simon Marchi Date: Wed, 31 Mar 2021 14:43:46 +0000 (-0400) Subject: Clean-up: filter: rename variable in filter-grammar-test.c X-Git-Tag: v2.13.0-rc1~144 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5ab21cac44b009eb6cbff63a222979c8fd02148c;p=lttng-tools.git Clean-up: filter: rename variable in filter-grammar-test.c ... to avoid variable shadowing. Change-Id: If5781b7e2f41ab5b1df361b9b247714b17751a32 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/filter/filter-grammar-test.c b/src/common/filter/filter-grammar-test.c index ca0b468c3..349dc475a 100644 --- a/src/common/filter/filter-grammar-test.c +++ b/src/common/filter/filter-grammar-test.c @@ -27,18 +27,18 @@ int main(int argc, char **argv) int ret; int print_xml = 0, generate_ir = 0, generate_bytecode = 0, print_bytecode = 0; - int i; + int argidx; - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-p") == 0) + for (argidx = 1; argidx < argc; argidx++) { + if (strcmp(argv[argidx], "-p") == 0) print_xml = 1; - else if (strcmp(argv[i], "-i") == 0) + else if (strcmp(argv[argidx], "-i") == 0) generate_ir = 1; - else if (strcmp(argv[i], "-b") == 0) + else if (strcmp(argv[argidx], "-b") == 0) generate_bytecode = 1; - else if (strcmp(argv[i], "-d") == 0) + else if (strcmp(argv[argidx], "-d") == 0) filter_parser_debug = 1; - else if (strcmp(argv[i], "-B") == 0) + else if (strcmp(argv[argidx], "-B") == 0) print_bytecode = 1; }