BUF_DUP(3) - Library Functions Manual
buf_dup - duplicate a string buffer
#include <buf.h>
int
buf_dup(struct buf *b, const struct buf
*src);
The pointer b must not contain data as it will be overriden and may be let unchanged as-is.
If the src buffer isn’t initialized (and contains a NULL data field) the destination buffer b is unchanged but the function returns 0.
Otherwise the buf_dup() function returns -1 in case of error and errno is set to indicate the error.
[ENOMEM
]
There wasn’t enough memory to duplicate the buffer.
libbuf(3)
The libbuf library was written by David Demelier <markand@malikania.fr>
macOS 13.5 - October 29, 2019-2022