mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
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>
This commit is contained in:
parent
6983f4e3b2
commit
45bec2ead2
|
@ -255,7 +255,7 @@ int cmd__parse_options_flags(int argc, const char **argv)
|
|||
argc = parse_options(argc, argv, NULL, test_flag_options, usage,
|
||||
PARSE_OPT_STOP_AT_NON_OPTION);
|
||||
|
||||
if (argc == 0 || strcmp(argv[0], "cmd")) {
|
||||
if (!argc || strcmp(argv[0], "cmd")) {
|
||||
error("'cmd' is mandatory");
|
||||
usage_with_options(usage, test_flag_options);
|
||||
}
|
||||
|
@ -313,7 +313,7 @@ int cmd__parse_subcommand(int argc, const char **argv)
|
|||
argc = parse_options(argc, argv, NULL, test_flag_options, usage,
|
||||
PARSE_OPT_STOP_AT_NON_OPTION);
|
||||
|
||||
if (argc == 0 || strcmp(argv[0], "cmd")) {
|
||||
if (!argc || strcmp(argv[0], "cmd")) {
|
||||
error("'cmd' is mandatory");
|
||||
usage_with_options(usage, test_flag_options);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue