]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Make static analyzer happier.
authorTimo Sirainen <tss@iki.fi>
Fri, 6 Jan 2012 17:54:03 +0000 (19:54 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 6 Jan 2012 17:54:03 +0000 (19:54 +0200)
src/doveadm/dsync/doveadm-dsync.c
src/doveadm/dsync/dsync-proxy.c

index 0ed585bed2f0f522a5914dab95174d627adc43b8..8086aa5469d401fff255be5e0272b623d7ee4a7a 100644 (file)
@@ -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];
index a2535accd8c3ecda31acf2ce9266d4a42adf0246..cd4584613e53582871bebd5c112c8cbd79023e42 100644 (file)
@@ -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;
 }