Skip to content

Commit 59a642f

Browse files
tanayabhgitster
authored andcommitted
imap-send: use skip_prefix instead of using magic numbers
Signed-off-by: Tanay Abhra <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent de8118e commit 59a642f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

imap-send.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,13 +1328,9 @@ static char *imap_folder;
13281328

13291329
static int git_imap_config(const char *key, const char *val, void *cb)
13301330
{
1331-
char imap_key[] = "imap.";
1332-
1333-
if (strncmp(key, imap_key, sizeof imap_key - 1))
1331+
if (!skip_prefix(key, "imap.", &key))
13341332
return 0;
13351333

1336-
key += sizeof imap_key - 1;
1337-
13381334
/* check booleans first, and barf on others */
13391335
if (!strcmp("sslverify", key))
13401336
server.ssl_verify = git_config_bool(key, val);

0 commit comments

Comments
 (0)