Skip to content

Commit

Permalink
imap-send: use skip_prefix instead of using magic numbers
Browse files Browse the repository at this point in the history
Signed-off-by: Tanay Abhra <tanayabh@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Tanay Abhra authored and Junio C Hamano committed Jun 20, 2014
1 parent de8118e commit 59a642f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions imap-send.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 59a642f

Please sign in to comment.