diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2011-01-18 21:23:50 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2011-01-18 21:23:50 +0200 |
commit | f71c4e16e913f660977526f0ef8d2acdf458d7c9 (patch) | |
tree | cdcb4d197fffd82e6631fd8efe7ce73e7f753797 /src/xz/util.h | |
parent | Scripts: Fix gzip and bzip2 support in xzdiff. (diff) | |
download | xz-f71c4e16e913f660977526f0ef8d2acdf458d7c9.tar.xz |
Add alloc_size and malloc attributes to a few functions.
Thanks to Cristian RodrÃguez for the original patch.
Diffstat (limited to 'src/xz/util.h')
-rw-r--r-- | src/xz/util.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xz/util.h b/src/xz/util.h index fea8cc66..4b2d3e2f 100644 --- a/src/xz/util.h +++ b/src/xz/util.h @@ -19,11 +19,12 @@ /// \brief Safe realloc() that never returns NULL -extern void *xrealloc(void *ptr, size_t size); +extern void *xrealloc(void *ptr, size_t size) + lzma_attribute((malloc)) lzma_attr_alloc_size(2); /// \brief Safe strdup() that never returns NULL -extern char *xstrdup(const char *src); +extern char *xstrdup(const char *src) lzma_attribute((malloc)); /// \brief Fancy version of strtoull() |