test-parse-options.c: fix style of comparison with zero

The preferred style is '!argc' instead of 'argc == 0'. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

SZEDER Gábor committed Sep 5, 2022 at 20:50 UTC 45bec2ead294b5f3565903995d3503ba31b8ad4a
1 file changed +2 -2
t/helper/test-parse-options.c
+2 -2
@@ -255,7 +255,7 @@ int cmd__parse_options_flags(int argc, const char **argv)
255 argc = parse_options(argc, argv, NULL, test_flag_options, usage,
256 PARSE_OPT_STOP_AT_NON_OPTION);
257
258 - if (argc == 0 || strcmp(argv[0], "cmd")) {
258 + if (!argc || strcmp(argv[0], "cmd")) {
259 error("'cmd' is mandatory");
260 usage_with_options(usage, test_flag_options);
261 }
@@ -313,7 +313,7 @@ int cmd__parse_subcommand(int argc, const char **argv)
313 argc = parse_options(argc, argv, NULL, test_flag_options, usage,
314 PARSE_OPT_STOP_AT_NON_OPTION);
315
316 - if (argc == 0 || strcmp(argv[0], "cmd")) {
316 + if (!argc || strcmp(argv[0], "cmd")) {
317 error("'cmd' is mandatory");
318 usage_with_options(usage, test_flag_options);
319 }