Skip to content

Commit f27bb87

Browse files
committed
malloc(0) -> NULL
1 parent cdc7859 commit f27bb87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

blosc/b2nd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ int b2nd_get_slice_nchunks(const b2nd_array_t *array, const int64_t *start, cons
617617
int8_t ndim = array->ndim;
618618

619619
if (array->nitems == 0){
620-
*chunks_idx = malloc(0);
620+
*chunks_idx = NULL;
621621
return 0;
622622
}
623623

blosc/schunk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,7 @@ int blosc2_schunk_set_slice_buffer(blosc2_schunk *schunk, int64_t start, int64_t
13941394
int schunk_get_slice_nchunks(blosc2_schunk *schunk, int64_t start, int64_t stop, int64_t **chunks_idx) {
13951395
BLOSC_ERROR_NULL(schunk, BLOSC2_ERROR_NULL_POINTER);
13961396
if (schunk->nchunks == 0){
1397-
*chunks_idx = malloc(0);
1397+
*chunks_idx = NULL;
13981398
return 0;
13991399
}
14001400
int64_t byte_start = start * schunk->typesize;

0 commit comments

Comments
 (0)