pomp_buffer_ensure_capacity

Function pomp_buffer_ensure_capacity 

Source
pub unsafe extern "C" fn pomp_buffer_ensure_capacity(
    buf: *mut pomp_buffer,
    capacity: usize,
) -> c_int
Expand description

Make sure internal data has enough room for the given size. @param buf : buffer. @param capacity : new capacity of buffer. @return 0 in case of success, negative errno value in case of error. -EPERM is returned if the buffer is shared (ref count is greater than 1).

@remarks : internally the size will be aligned to POMP_BUFFER_ALLOC_STEP.