aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/common.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2023-09-11 18:47:26 +0300
committerLasse Collin <lasse.collin@tukaani.org>2023-09-22 20:06:27 +0300
commitee7709bae53637e1765ce142ef102914f1423cb5 (patch)
treece584379998967502aba809e8397bc37a586b1c7 /src/liblzma/common/common.c
parentxz, xzdec, lzmainfo: Use tuklib_attr_noreturn. (diff)
downloadxz-ee7709bae53637e1765ce142ef102914f1423cb5.tar.xz
liblzma: Move a few __attribute__ uses in function declarations.
The API headers have many attributes but these were left as is for now.
Diffstat (limited to '')
-rw-r--r--src/liblzma/common/common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/liblzma/common/common.c b/src/liblzma/common/common.c
index 02a10641..adb50d78 100644
--- a/src/liblzma/common/common.c
+++ b/src/liblzma/common/common.c
@@ -35,7 +35,8 @@ lzma_version_string(void)
// Memory allocation //
///////////////////////
-extern void * lzma_attr_alloc_size(1)
+lzma_attr_alloc_size(1)
+extern void *
lzma_alloc(size_t size, const lzma_allocator *allocator)
{
// Some malloc() variants return NULL if called with size == 0.
@@ -53,7 +54,8 @@ lzma_alloc(size_t size, const lzma_allocator *allocator)
}
-extern void * lzma_attr_alloc_size(1)
+lzma_attr_alloc_size(1)
+extern void *
lzma_alloc_zero(size_t size, const lzma_allocator *allocator)
{
// Some calloc() variants return NULL if called with size == 0.