aboutsummaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorTanay Abhra <tanayabh@gmail.com>2014-06-19 05:22:46 +0000
committerJunio C Hamano <gitster@pobox.com>2014-06-20 10:45:19 -0700
commit59a642f8ac42c6cd11f63175689aa21b27ce1a6a (patch)
tree1d44ae0604ffdf97294bf4ac91636cdc992479dc /imap-send.c
parentde8118e153c5e527263086605e437ccca5d4f1ef (diff)
downloadgit-59a642f8ac42c6cd11f63175689aa21b27ce1a6a.tar.gz
git-59a642f8ac42c6cd11f63175689aa21b27ce1a6a.tar.xz
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>
Diffstat (limited to 'imap-send.c')
-rw-r--r--imap-send.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/imap-send.c b/imap-send.c
index 83a6ed2ac..524fbabc9 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -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);