Commit 2a3bd726 authored by Robert Schmidt's avatar Robert Schmidt

byte_array: don't use OAI assertions.h, requires exit_function()

Using AssertFatal() has the drawback that it requires the definition of
an exit_function() (which is typically declared in OAI main
executables). We don't want to pull in such dependency for every
consumer. Hence, use c stdlib's assert() instead.
parent f955a0fc
......@@ -21,7 +21,6 @@
#include "byte_array.h"
#include "common/utils/assertions.h"
#include <assert.h>
#include <string.h>
......@@ -29,7 +28,7 @@ byte_array_t copy_byte_array(byte_array_t src)
{
byte_array_t dst = {0};
dst.buf = malloc(src.len);
AssertFatal(dst.buf != NULL, "Memory exhausted");
assert(dst.buf != NULL && "Memory exhausted");
memcpy(dst.buf, src.buf, src.len);
dst.len = src.len;
return dst;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment