From 875425080df13933baf484b35988d3a2dc04629e Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 10 Jan 2017 12:06:10 -0800 Subject: [PATCH] index: improve constness for reading blob data Improve constness of the index_state parameter to the 'read_blob_data_from_index' function. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- cache.h | 2 +- read-cache.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cache.h b/cache.h index 1b67f078dd..ef89eb4a0f 100644 --- a/cache.h +++ b/cache.h @@ -599,7 +599,7 @@ extern int chmod_index_entry(struct index_state *, struct cache_entry *ce, char extern int ce_same_name(const struct cache_entry *a, const struct cache_entry *b); extern void set_object_name_for_intent_to_add_entry(struct cache_entry *ce); extern int index_name_is_other(const struct index_state *, const char *, int); -extern void *read_blob_data_from_index(struct index_state *, const char *, unsigned long *); +extern void *read_blob_data_from_index(const struct index_state *, const char *, unsigned long *); /* do stat comparison even if CE_VALID is true */ #define CE_MATCH_IGNORE_VALID 01 diff --git a/read-cache.c b/read-cache.c index 2eca639cce..7a9a7de91e 100644 --- a/read-cache.c +++ b/read-cache.c @@ -2285,7 +2285,8 @@ int index_name_is_other(const struct index_state *istate, const char *name, return 1; } -void *read_blob_data_from_index(struct index_state *istate, const char *path, unsigned long *size) +void *read_blob_data_from_index(const struct index_state *istate, + const char *path, unsigned long *size) { int pos, len; unsigned long sz;