Skip to content

Commit a0a2f7d

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent d8779e1 commit a0a2f7d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ewah/ewah_io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ int ewah_serialize(struct ewah_bitmap *self, int fd)
110110
return ewah_serialize_to(self, write_helper, (void *)(intptr_t)fd);
111111
}
112112

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)
114114
{
115-
uint8_t *ptr = map;
115+
const uint8_t *ptr = map;
116116
size_t i;
117117

118118
self->bit_size = get_be32(ptr);

ewah/ewok.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ int ewah_serialize(struct ewah_bitmap *self, int fd);
9999
int ewah_serialize_native(struct ewah_bitmap *self, int fd);
100100

101101
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);
103103
int ewah_read_mmap_native(struct ewah_bitmap *self, void *map, size_t len);
104104

105105
uint32_t ewah_checksum(struct ewah_bitmap *self);

0 commit comments

Comments
 (0)