imap-send: use skip_prefix instead of using magic numbers
Signed-off-by: Tanay Abhra <tanayabh@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
de8118e153
commit
59a642f8ac
@ -1328,13 +1328,9 @@ static char *imap_folder;
|
||||
|
||||
static int git_imap_config(const char *key, const char *val, void *cb)
|
||||
{
|
||||
char imap_key[] = "imap.";
|
||||
|
||||
if (strncmp(key, imap_key, sizeof imap_key - 1))
|
||||
if (!skip_prefix(key, "imap.", &key))
|
||||
return 0;
|
||||
|
||||
key += sizeof imap_key - 1;
|
||||
|
||||
/* check booleans first, and barf on others */
|
||||
if (!strcmp("sslverify", key))
|
||||
server.ssl_verify = git_config_bool(key, val);
|
||||
|
Loading…
Reference in New Issue
Block a user