User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v7.5.x:api:ubf:brealloc.3

realloc

Name

Brealloc — Reallocate buffer to given size

Synopsis

#include <ubf.h>

UBFH * Brealloc (UBFH *p_ub, BFLDOCC f, BFLDLEN v);

Link with -lubf -lnstd -lm -lpthread

DESCRIPTION

Reallocates UBF buffer to store the number of fields of f with total data length of v bytes, length must include zero terminator byte for strings.

RETURN VALUE

On success, Brealloc() returns pointer to UBF buffer; on error, NULL is returned, with Berror set to indicate the error.

ERRORS

Note that Bstrerror() returns generic error message plus custom message with debug info from last function call.

BEINVAL Buffer is shorter than currently bytes used, or the total size of bigger than MAXUBFLEN.

BMALLOC Malloc failed.

EXAMPLE

See ubftest/test_mem.c for sample code.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd