From: Timo Sirainen Date: Fri, 6 Jan 2012 17:54:03 +0000 (+0200) Subject: Make static analyzer happier. X-Git-Tag: 2.1.rc3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdc2cb6a956f2eea76b1d45b95b710d99392f5c9;p=thirdparty%2Fdovecot%2Fcore.git Make static analyzer happier. --- diff --git a/src/doveadm/dsync/doveadm-dsync.c b/src/doveadm/dsync/doveadm-dsync.c index 0ed585bed2..8086aa5469 100644 --- a/src/doveadm/dsync/doveadm-dsync.c +++ b/src/doveadm/dsync/doveadm-dsync.c @@ -79,6 +79,8 @@ mirror_get_remote_cmd_line(const char *const *argv, unsigned int i; const char *p; + i_assert(argv[0] != NULL); + t_array_init(&cmd_args, 16); for (i = 0; argv[i] != NULL; i++) { p = argv[i]; diff --git a/src/doveadm/dsync/dsync-proxy.c b/src/doveadm/dsync/dsync-proxy.c index a2535accd8..cd4584613e 100644 --- a/src/doveadm/dsync/dsync-proxy.c +++ b/src/doveadm/dsync/dsync-proxy.c @@ -345,10 +345,8 @@ int dsync_proxy_mailbox_import_unescaped(pool_t pool, const char *const *args, return -1; } - args += i; - count -= i; - if (dsync_proxy_cache_fields_import(args, pool, &box_r->cache_fields, - error_r) < 0) + if (dsync_proxy_cache_fields_import(args + i, pool, + &box_r->cache_fields, error_r) < 0) return -1; return 0; }