int ewah_read_mmap(struct ewah_bitmap *self, void *map, size_t len)
{
uint8_t *ptr = map;
+ size_t i;
self->bit_size = get_be32(ptr);
ptr += sizeof(uint32_t);
memcpy(self->buffer, ptr, self->buffer_size * sizeof(uint64_t));
ptr += self->buffer_size * sizeof(uint64_t);
-#if __BYTE_ORDER != __BIG_ENDIAN
- {
- size_t i;
- for (i = 0; i < self->buffer_size; ++i)
- self->buffer[i] = ntohll(self->buffer[i]);
- }
-#endif
+ for (i = 0; i < self->buffer_size; ++i)
+ self->buffer[i] = ntohll(self->buffer[i]);
self->rlw = self->buffer + get_be32(ptr);