diff options
Diffstat (limited to 'src/htsarrays.h')
-rw-r--r-- | src/htsarrays.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/htsarrays.h b/src/htsarrays.h index 5c83a07..a750e42 100644 --- a/src/htsarrays.h +++ b/src/htsarrays.h @@ -104,11 +104,11 @@ static void hts_record_assert_memory_failed(const size_t size) { while (TypedArrayRoom(A) < room_) { \ TypedArrayCapa(A) = TypedArrayCapa(A) < 16 ? 16 : TypedArrayCapa(A) * 2; \ } \ - TypedArrayPtr(A) = realloc(TypedArrayPtr(A), \
- TypedArrayCapa(A)*TypedArrayWidth(A)); \
- if (TypedArrayPtr(A) == NULL) { \
- hts_record_assert_memory_failed(TypedArrayCapa(A)*TypedArrayWidth(A)); \
- } \
+ TypedArrayPtr(A) = realloc(TypedArrayPtr(A), \ + TypedArrayCapa(A)*TypedArrayWidth(A)); \ + if (TypedArrayPtr(A) == NULL) { \ + hts_record_assert_memory_failed(TypedArrayCapa(A)*TypedArrayWidth(A)); \ + } \ } while(0) /** Add an element. Macro, first element evaluated multiple times. **/ |