Age | Commit message (Collapse) | Author |
|
|
|
|
|
Define md_asprintf() as an equivalent of the GNU libc's asprintf()
(with buffer allocated by md_malloc).
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
Don't fail if string to duplicate is shorter than the size parameter
and handle memory allocation failure.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
Don't fail if _md_malloc() returns NULL.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
-Allow reallocation of NULL pointers (equivalent to a malloc() call)
-Allow 'size' to be 0 (equivalent to a free() call)
-Handle case where 'size' is smaller than the original buffer length
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
free(NULL) is a no-op, but beside that it's a valid call which should
be supported.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
Report memory allocation failures in md_alloc() by returning a NULL
pointer.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
|
|
|