summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2018-01-12 17:36:19 +0000
committerpfg <pfg@FreeBSD.org>2018-01-12 17:36:19 +0000
commitccc4a2a5d85252c40e3af23a00d30d3653c46f58 (patch)
tree0b25d081239c404dbc78556f4fec43e5db556d06 /include
parenta586b974f77aedb619baf0454435fa4016339161 (diff)
downloadFreeBSD-src-ccc4a2a5d85252c40e3af23a00d30d3653c46f58.zip
FreeBSD-src-ccc4a2a5d85252c40e3af23a00d30d3653c46f58.tar.gz
MFC r327697, r327699:
Use the __result_use_check attribute for reallocf(9). MFC r327751: Use the __result_use_check attribute also for reallocf(3). The GCC attribute causes a warning to be emitted if a caller of the function with this attribute does not use its return value. Unlike the traditional realloc, with reallocf(3) we don't have to check for NULL values but we still have to make sure the result is used.
Diffstat (limited to 'include')
-rw-r--r--include/stdlib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index eb79404..0928c33 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -309,7 +309,7 @@ int radixsort(const unsigned char **, int, const unsigned char *,
unsigned);
void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2)
__alloc_size(3);
-void *reallocf(void *, size_t) __alloc_size(2);
+void *reallocf(void *, size_t) __result_use_check __alloc_size(2);
int rpmatch(const char *);
void setprogname(const char *);
int sradixsort(const unsigned char **, int, const unsigned char *,
OpenPOWER on IntegriCloud