aboutsummaryrefslogtreecommitdiff
path: root/include/stdlib.h
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2018-01-09 22:48:13 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2018-01-09 22:48:13 +0000
commitdd5edb11b1baeb84dace48400c866ba234b22c16 (patch)
tree02c444210388766b5acf688beeed0a57c6da77cf /include/stdlib.h
parent876f6a6af20c97bfb8f09f39d63dac29409c3346 (diff)
downloadsrc-dd5edb11b1baeb84dace48400c866ba234b22c16.tar.gz
src-dd5edb11b1baeb84dace48400c866ba234b22c16.zip
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. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=327751
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 56bb1566d58e..b2fc90934f85 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -304,7 +304,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 *,