isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 5dfca41422e0b4149ad7f5b59c00c6fe1c2760ca
parent f377e7b696f2345482e1b1ce1400be5761f5233b
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Mon, 29 Dec 2014 02:16:28 +0100

fix more memcmp() abuse

amends 1217193fb and 4f383a807.

Diffstat:
Msrc/drv_imap.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c @@ -1001,7 +1001,7 @@ parse_capability( imap_store_t *ctx, char *cmd ) ctx->auth_mechs = 0; ctx->caps = 0x80000000; while ((arg = next_arg( &cmd ))) { - if (!memcmp( "AUTH=", arg, 5 )) { + if (starts_with( arg, -1, "AUTH=", 5 )) { add_string_list( &ctx->auth_mechs, arg + 5 ); } else { for (i = 0; i < as(cap_list); i++) @@ -2519,7 +2519,7 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) #endif if (starts_with( arg, -1, "imap:", 5 )) arg += 5; - if (!memcmp( "//", arg, 2 )) + if (starts_with( arg, -1, "//", 2 )) arg += 2; if (arg != cfg->val) warn( "%s:%d: Notice: URL notation is deprecated; use a plain host name and possibly 'SSLType IMAPS' instead\n", cfg->file, cfg->line );