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>

Tanay Abhra committed Jun 19, 2014 at 05:22 UTC 59a642f8ac42c6cd11f63175689aa21b27ce1a6a
1 file changed +1 -5
imap-send.c
+1 -5
@@ -1328,13 +1328,9 @@ static char *imap_folder;
1328
1329 static int git_imap_config(const char *key, const char *val, void *cb)
1330 {
1331 - char imap_key[] = "imap.";
1332 -
1333 - if (strncmp(key, imap_key, sizeof imap_key - 1))
1331 + if (!skip_prefix(key, "imap.", &key))
1332 return 0;
1333
1336 - key += sizeof imap_key - 1;
1337 -
1334 /* check booleans first, and barf on others */
1335 if (!strcmp("sslverify", key))
1336 server.ssl_verify = git_config_bool(key, val);