summaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-20 09:55:07 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-02-21 06:03:15 (GMT)
commit1968d77dd632a9a9e5c6f5681649e5e65ed13088 (patch)
tree3321cc876345e8f134b6e1b2ceb556d0061ff2c5 /imap-send.c
parent599065a3bb94ae9f48e3808b8fafc8443017af28 (diff)
downloadgit-1968d77dd632a9a9e5c6f5681649e5e65ed13088.zip
git-1968d77dd632a9a9e5c6f5681649e5e65ed13088.tar.gz
git-1968d77dd632a9a9e5c6f5681649e5e65ed13088.tar.bz2
prefixcmp(): fix-up leftover strncmp().
There were instances of strncmp() that were formatted improperly (e.g. whitespace around parameter before closing parenthesis) that caused the earlier mechanical conversion step to miss them. This step cleans them up. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'imap-send.c')
-rw-r--r--imap-send.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/imap-send.c b/imap-send.c
index 3eaf025..84df2fa 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1192,7 +1192,7 @@ count_messages( msg_data_t *msg )
char *p = msg->data;
while (1) {
- if (!strncmp( "From ", p, 5 )) {
+ if (!prefixcmp(p, "From ")) {
count++;
p += 5;
}
@@ -1216,7 +1216,7 @@ split_msg( msg_data_t *all_msgs, msg_data_t *msg, int *ofs )
data = &all_msgs->data[ *ofs ];
msg->len = all_msgs->len - *ofs;
- if (msg->len < 5 || strncmp( data, "From ", 5 ))
+ if (msg->len < 5 || prefixcmp(data, "From "))
return 0;
p = strchr( data, '\n' );
@@ -1267,12 +1267,12 @@ git_imap_config(const char *key, const char *val)
imap_folder = xstrdup( val );
} else if (!strcmp( "host", key )) {
{
- if (!strncmp( "imap:", val, 5 ))
+ if (!prefixcmp(val, "imap:"))
val += 5;
if (!server.port)
server.port = 143;
}
- if (!strncmp( "//", val, 2 ))
+ if (!prefixcmp(val, "//"))
val += 2;
server.host = xstrdup( val );
}