ewah: fix constness of ewah_read_mmap
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Apr 28, 2014 at 17:55 UTC
a0a2f7d79c953b012adcfb0be3f9a60d5efbf644
2 files changed
+3
-3
ewah/ewah_io.c
+2
-2
@@ -110,9 +110,9 @@ int ewah_serialize(struct ewah_bitmap *self, int fd)
110
return ewah_serialize_to(self, write_helper, (void *)(intptr_t)fd);
111
}
112
113
-int ewah_read_mmap(struct ewah_bitmap *self, void *map, size_t len)
113
+int ewah_read_mmap(struct ewah_bitmap *self, const void *map, size_t len)
114
{
115
- uint8_t *ptr = map;
115
+ const uint8_t *ptr = map;
116
size_t i;
117
118
self->bit_size = get_be32(ptr);
ewah/ewok.h
+1
-1
@@ -99,7 +99,7 @@ int ewah_serialize(struct ewah_bitmap *self, int fd);
99
int ewah_serialize_native(struct ewah_bitmap *self, int fd);
100
101
int ewah_deserialize(struct ewah_bitmap *self, int fd);
102
-int ewah_read_mmap(struct ewah_bitmap *self, void *map, size_t len);
102
+int ewah_read_mmap(struct ewah_bitmap *self, const void *map, size_t len);
103
int ewah_read_mmap_native(struct ewah_bitmap *self, void *map, size_t len);
104
105
uint32_t ewah_checksum(struct ewah_bitmap *self);