diff options
Diffstat (limited to 'ewah/ewah_io.c')
-rw-r--r-- | ewah/ewah_io.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ewah/ewah_io.c b/ewah/ewah_io.c index 43481b9c6..4acff97d1 100644 --- a/ewah/ewah_io.c +++ b/ewah/ewah_io.c @@ -134,12 +134,9 @@ int ewah_read_mmap(struct ewah_bitmap *self, const void *map, size_t len) self->buffer_size = self->alloc_size = get_be32(ptr); ptr += sizeof(uint32_t); - self->buffer = ewah_realloc(self->buffer, + self->buffer = xrealloc(self->buffer, self->alloc_size * sizeof(eword_t)); - if (!self->buffer) - return -1; - /* * Copy the raw data for the bitmap as a whole chunk; * if we're in a little-endian platform, we'll perform @@ -180,12 +177,9 @@ int ewah_deserialize(struct ewah_bitmap *self, int fd) return -1; self->buffer_size = self->alloc_size = (size_t)ntohl(word_count); - self->buffer = ewah_realloc(self->buffer, + self->buffer = xrealloc(self->buffer, self->alloc_size * sizeof(eword_t)); - if (!self->buffer) - return -1; - /** 64 bit x N -- compressed words */ buffer = self->buffer; words_left = self->buffer_size; |