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 <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Williams committed
Jan 10, 2017 at 12:06 UTC
875425080df13933baf484b35988d3a2dc04629e
2 files changed
+3
-2
cache.h
+1
-1
@@ -599,7 +599,7 @@ extern int chmod_index_entry(struct index_state *, struct cache_entry *ce, char
599
extern int ce_same_name(const struct cache_entry *a, const struct cache_entry *b);
600
extern void set_object_name_for_intent_to_add_entry(struct cache_entry *ce);
601
extern int index_name_is_other(const struct index_state *, const char *, int);
602
-extern void *read_blob_data_from_index(struct index_state *, const char *, unsigned long *);
602
+extern void *read_blob_data_from_index(const struct index_state *, const char *, unsigned long *);
603
604
/* do stat comparison even if CE_VALID is true */
605
#define CE_MATCH_IGNORE_VALID 01
read-cache.c
+2
-1
@@ -2285,7 +2285,8 @@ int index_name_is_other(const struct index_state *istate, const char *name,
2285
return 1;
2286
}
2287
2288
-void *read_blob_data_from_index(struct index_state *istate, const char *path, unsigned long *size)
2288
+void *read_blob_data_from_index(const struct index_state *istate,
2289
+ const char *path, unsigned long *size)
2290
{
2291
int pos, len;
2292
unsigned long sz;