summaryrefslogtreecommitdiff
path: root/toxcore/util.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2017-01-04 22:37:53 +0000
committeriphydf <iphydf@users.noreply.github.com>2017-01-11 19:43:08 +0000
commit8b4eae4038db87f2df1c40856c99c3ffca8887fe (patch)
treea3d712f2adf081f56a4295a34f5a8c75523e5a18 /toxcore/util.h
parent583d71680ec12349cd1bedea72ae136d55667ecb (diff)
Remove `TOX_DEBUG` and have asserts always enabled.
These are cheap asserts. I've also replaced the fprintf's with `LOGGER_ERROR` calls.
Diffstat (limited to 'toxcore/util.h')
-rw-r--r--toxcore/util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/util.h b/toxcore/util.h
index c435813b..daa5a26d 100644
--- a/toxcore/util.h
+++ b/toxcore/util.h
@@ -29,6 +29,8 @@
29#include <stdbool.h> 29#include <stdbool.h>
30#include <stdint.h> 30#include <stdint.h>
31 31
32#include "logger.h"
33
32#define MIN(a,b) (((a)<(b))?(a):(b)) 34#define MIN(a,b) (((a)<(b))?(a):(b))
33#define PAIR(TYPE1__, TYPE2__) struct { TYPE1__ first; TYPE2__ second; } 35#define PAIR(TYPE1__, TYPE2__) struct { TYPE1__ first; TYPE2__ second; }
34 36
@@ -52,7 +54,7 @@ void lendian_to_host32(uint32_t *dest, const uint8_t *lendian);
52 54
53/* state load/save */ 55/* state load/save */
54typedef int (*load_state_callback_func)(void *outer, const uint8_t *data, uint32_t len, uint16_t type); 56typedef int (*load_state_callback_func)(void *outer, const uint8_t *data, uint32_t len, uint16_t type);
55int load_state(load_state_callback_func load_state_callback, void *outer, 57int load_state(load_state_callback_func load_state_callback, Logger *log, void *outer,
56 const uint8_t *data, uint32_t length, uint16_t cookie_inner); 58 const uint8_t *data, uint32_t length, uint16_t cookie_inner);
57 59
58/* Returns -1 if failed or 0 if success */ 60/* Returns -1 if failed or 0 if success */