diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-12-31 21:08:24 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-12-31 21:08:24 +0200 |
commit | ba97a9f4d4dd21b74af45e511470bcbbc60ad992 (patch) | |
tree | 69338fa8da88af62670873229aae35b5d7e56aea /src/common.h | |
parent | 97da3cf73b6e55e4f33282db75e0503c90f21399 (diff) |
removed over-optimization at the registry to simplify its logic and remove race conditions that could result to crashes; registry is now split into multiple files, to allow easier enhancements
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common.h b/src/common.h index baa95dcb07..0fc4e820dc 100644 --- a/src/common.h +++ b/src/common.h @@ -170,6 +170,8 @@ #endif #define abs(x) ((x < 0)? -x : x) +#define GUID_LEN 36 + extern void netdata_fix_chart_id(char *s); extern void netdata_fix_chart_name(char *s); @@ -198,10 +200,10 @@ extern void *mallocz_int(const char *file, const char *function, const unsigned extern void *reallocz_int(const char *file, const char *function, const unsigned long line, void *ptr, size_t size); extern void freez_int(const char *file, const char *function, const unsigned long line, void *ptr); #else -extern char *strdupz(const char *s); -extern void *callocz(size_t nmemb, size_t size); -extern void *mallocz(size_t size); -extern void *reallocz(void *ptr, size_t size); +extern char *strdupz(const char *s) __attribute__((returns_nonnull)); +extern void *callocz(size_t nmemb, size_t size) __attribute__((returns_nonnull)); +extern void *mallocz(size_t size) __attribute__((returns_nonnull)); +extern void *reallocz(void *ptr, size_t size) __attribute__((returns_nonnull)); extern void freez(void *ptr); #endif |