Linux: added support for sdlog2

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-03-17 19:02:10 -07:00
parent 13d84ef17b
commit 5f3496353c
8 changed files with 45 additions and 28 deletions
+2 -1
View File
@@ -39,6 +39,7 @@
* @author Anton Babushkin <anton.babushkin@me.com>
*/
#include <px4_defines.h>
#include <string.h>
#include <stdlib.h>
@@ -50,7 +51,7 @@ int logbuffer_init(struct logbuffer_s *lb, int size)
lb->write_ptr = 0;
lb->read_ptr = 0;
lb->data = malloc(lb->size);
return (lb->data == 0) ? ERROR : OK;
return (lb->data == 0) ? PX4_ERROR : PX4_OK;
}
int logbuffer_count(struct logbuffer_s *lb)