]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: mail_cache_lookup_headers() - Use const for field_idxs[]
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 31 Mar 2020 19:53:35 +0000 (22:53 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 15 Apr 2020 08:57:20 +0000 (08:57 +0000)
src/lib-index/mail-cache-lookup.c
src/lib-index/mail-cache.h

index bca673478d175f50926e986d0fa9d22ea02e3d26..e7cb9dbeb37a468c86f63bd10a2b3048192b5828 100644 (file)
@@ -509,7 +509,7 @@ static int header_lookup_line_cmp(const struct header_lookup_line *l1,
 
 static int
 mail_cache_lookup_headers_real(struct mail_cache_view *view, string_t *dest,
-                              uint32_t seq, unsigned int field_idxs[],
+                              uint32_t seq, const unsigned int field_idxs[],
                               unsigned int fields_count, pool_t *pool_r)
 {
        struct mail_cache *cache = view->cache;
@@ -607,7 +607,7 @@ mail_cache_lookup_headers_real(struct mail_cache_view *view, string_t *dest,
 }
 
 int mail_cache_lookup_headers(struct mail_cache_view *view, string_t *dest,
-                             uint32_t seq, unsigned int field_idxs[],
+                             uint32_t seq, const unsigned int field_idxs[],
                              unsigned int fields_count)
 {
        pool_t pool = NULL;
index 2de6f03a7a4c2a33da465ccf0632d1791306a13c..1f51d989ae4c94d14b75b4efd3b1235db8c43b71 100644 (file)
@@ -148,7 +148,7 @@ int mail_cache_lookup_field(struct mail_cache_view *view, buffer_t *dest_buf,
 /* Return specified cached headers. Returns 1 if all fields were found,
    0 if not, -1 if error. dest is updated only if all fields were found. */
 int mail_cache_lookup_headers(struct mail_cache_view *view, string_t *dest,
-                             uint32_t seq, unsigned int field_idxs[],
+                             uint32_t seq, const unsigned int field_idxs[],
                              unsigned int fields_count);
 
 /* "Error in index cache file %s: ...". */