From: Timo Sirainen Date: Tue, 31 Mar 2020 19:53:35 +0000 (+0300) Subject: lib-index: mail_cache_lookup_headers() - Use const for field_idxs[] X-Git-Tag: 2.3.11.2~438 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14ee11490a238a04a11840e816b95993106b5ddc;p=thirdparty%2Fdovecot%2Fcore.git lib-index: mail_cache_lookup_headers() - Use const for field_idxs[] --- diff --git a/src/lib-index/mail-cache-lookup.c b/src/lib-index/mail-cache-lookup.c index bca673478d..e7cb9dbeb3 100644 --- a/src/lib-index/mail-cache-lookup.c +++ b/src/lib-index/mail-cache-lookup.c @@ -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; diff --git a/src/lib-index/mail-cache.h b/src/lib-index/mail-cache.h index 2de6f03a7a..1f51d989ae 100644 --- a/src/lib-index/mail-cache.h +++ b/src/lib-index/mail-cache.h @@ -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: ...". */