Source
/* Assignment to eliminate unused parameter warning. */
cd_values = cd_values;
if(flags & H5Z_FLAG_REVERSE) { /*read*/
ret_value = *buf_size = nbytes - SUFFIX_LEN;
} /* end if */
else { /*write*/
void *outbuf = NULL; /* Pointer to new buffer */
unsigned char *dst; /* Temporary pointer to destination buffer */
dst = (unsigned char *)(outbuf = malloc(nbytes + SUFFIX_LEN));
dst = (unsigned char *)(outbuf = H5allocate_memory(nbytes + SUFFIX_LEN, 0));
/* Copy raw data */
memcpy((void*)dst, (void*)(*buf), nbytes);
/* Append suffix to raw data for storage */
dst += nbytes;
memcpy(dst, (void*)GROUP_SUFFIX, SUFFIX_LEN);
/* Free input buffer */
free(*buf);
H5free_memory(*buf);
/* Set return values */
*buf_size = nbytes + SUFFIX_LEN;
*buf = outbuf;
outbuf = NULL;
ret_value = *buf_size;
} /* end else */
return ret_value;
} /* H5Z_filter_dynlib3() */