Git fork

contrib/credential: fix compilation of "osxkeychain" helper

The "osxkeychain" helper does not compile due to a warning generated by
the unused `argc` parameter. Fix the warning by checking for the minimum
number of required arguments explicitly in the least restrictive way
possible.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Patrick Steinhardt and committed by
Junio C Hamano
3f228892 a47b8733

+1 -1
+1 -1
contrib/credential/osxkeychain/git-credential-osxkeychain.c
··· 422 422 const char *usage = 423 423 "usage: git credential-osxkeychain <get|store|erase>"; 424 424 425 - if (!argv[1]) 425 + if (argc < 2 || !*argv[1]) 426 426 die("%s", usage); 427 427 428 428 if (open(argv[0], O_RDONLY | O_EXLOCK) == -1)