BUF_DUP(3) - Library Functions Manual
buf_dup - duplicate a string buffer
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 true.
Otherwise the buf_dup() function returns false in case of error and errno is set to indicate the error.
There wasn’t enough memory to duplicate the buffer.
The libbuf library was written by David Demelier <firstname.lastname@example.org>
macOS 11.2 - October 29, 2019-2020