From a73893381f0b7be98b8eb99d31ff834c7658d27c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 5 Aug 2005 07:11:32 +0000 Subject: Introduce bt_malloc() and bt_free() functions --- include/bluetooth.h | 3 +++ src/bluetooth.c | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/bluetooth.h b/include/bluetooth.h index 33d68a61..b5d056df 100644 --- a/include/bluetooth.h +++ b/include/bluetooth.h @@ -136,6 +136,9 @@ int bafprintf(FILE *stream, const char *format, ...); int basprintf(char *str, const char *format, ...); int basnprintf(char *str, size_t size, const char *format, ...); +void *bt_malloc(size_t size); +void bt_free(void *ptr); + int bt_error(uint16_t code); char *bt_compidtostr(int id); diff --git a/src/bluetooth.c b/src/bluetooth.c index c54d63e3..1c01e2d9 100644 --- a/src/bluetooth.c +++ b/src/bluetooth.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -162,6 +163,16 @@ int basnprintf(char *str, size_t size, const char *format, ...) return len; } +void *bt_malloc(size_t size) +{ + return malloc(size); +} + +void bt_free(void *ptr) +{ + free(ptr); +} + /* Bluetooth error codes to Unix errno mapping */ int bt_error(uint16_t code) { -- cgit