From a35b8b225da4d3cf4bd81af3808f2ec50db003ce Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Thu, 10 Mar 2022 17:31:34 -0500 Subject: Add access function attributes to grp and shadow headers This patch adds access function attributes to the re-entrant functions in grp.h and shadow headers. Reviewed-by: Siddhesh Poyarekar --- shadow/shadow.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'shadow') diff --git a/shadow/shadow.h b/shadow/shadow.h index b29bcc41d0..649691b63c 100644 --- a/shadow/shadow.h +++ b/shadow/shadow.h @@ -122,19 +122,23 @@ extern int putspent (const struct spwd *__p, FILE *__stream); or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int getspent_r (struct spwd *__result_buf, char *__buffer, - size_t __buflen, struct spwd **__result); + size_t __buflen, struct spwd **__result) + __attr_access ((__write_only__, 2, 3)); extern int getspnam_r (const char *__name, struct spwd *__result_buf, char *__buffer, size_t __buflen, - struct spwd **__result); + struct spwd **__result) + __attr_access ((__write_only__, 3, 4)); extern int sgetspent_r (const char *__string, struct spwd *__result_buf, char *__buffer, size_t __buflen, - struct spwd **__result); + struct spwd **__result) + __attr_access ((__write_only__, 3, 4)); extern int fgetspent_r (FILE *__stream, struct spwd *__result_buf, char *__buffer, size_t __buflen, - struct spwd **__result); + struct spwd **__result) + __attr_access ((__write_only__, 3, 4)); #endif /* misc */ -- cgit v1.2.3