X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fxalloc.h;h=33f30d02da744c418b3ad56eb033fedfe97c92d8;hb=04d8a8e34e1fe7f33f1946863b36a24ee358175f;hp=493af5c0f245b1ac7f3b545d3c0bbb0ea8010291;hpb=f6e87ab476a0faf8b124ecaaa27f967d825e6457;p=tinc diff --git a/src/xalloc.h b/src/xalloc.h index 493af5c0..33f30d02 100644 --- a/src/xalloc.h +++ b/src/xalloc.h @@ -2,7 +2,7 @@ #define TINC_XALLOC_H /* - xalloc.h -- malloc and related fuctions with out of memory checking + xalloc.h -- malloc and related functions with out of memory checking Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. Copyright (C) 2011-2013 Guus Sliepen @@ -21,6 +21,8 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "system.h" + static inline void *xmalloc(size_t n) __attribute__((__malloc__)); static inline void *xmalloc(size_t n) { void *p = malloc(n); @@ -53,7 +55,7 @@ static inline void *xrealloc(void *p, size_t n) { return p; } -static inline char *xstrdup(const char *s) __attribute__((__malloc__)); +static inline char *xstrdup(const char *s) __attribute__((__malloc__)) __attribute((__nonnull__)); static inline char *xstrdup(const char *s) { char *p = strdup(s);