aboutsummaryrefslogtreecommitdiff
path: root/grp
diff options
context:
space:
mode:
authorSteve Grubb <sgrubb@redhat.com>2022-03-10 17:31:34 -0500
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2022-03-14 20:02:30 +0530
commita35b8b225da4d3cf4bd81af3808f2ec50db003ce (patch)
treed5bef55cbec985fd28f85d49c322409eca4ffbe3 /grp
parent70f021e66ae73a99bff9bcc5b71eefb63fc74320 (diff)
downloadglibc-a35b8b225da4d3cf4bd81af3808f2ec50db003ce.zip
glibc-a35b8b225da4d3cf4bd81af3808f2ec50db003ce.tar.gz
glibc-a35b8b225da4d3cf4bd81af3808f2ec50db003ce.tar.bz2
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 <siddhesh@sourceware.org>
Diffstat (limited to 'grp')
-rw-r--r--grp/grp.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/grp/grp.h b/grp/grp.h
index db32f89..bd3f601 100644
--- a/grp/grp.h
+++ b/grp/grp.h
@@ -130,7 +130,8 @@ extern struct group *getgrnam (const char *__name);
# ifdef __USE_GNU
extern int getgrent_r (struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result);
+ struct group **__restrict __result)
+ __attr_access ((__write_only__, 2, 3));
# endif
/* Search for an entry with a matching group ID.
@@ -139,7 +140,8 @@ extern int getgrent_r (struct group *__restrict __resultbuf,
marked with __THROW. */
extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result);
+ struct group **__restrict __result)
+ __attr_access ((__write_only__, 3, 4));
/* Search for an entry with a matching group name.
@@ -148,7 +150,8 @@ extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf,
extern int getgrnam_r (const char *__restrict __name,
struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result);
+ struct group **__restrict __result)
+ __attr_access ((__write_only__, 3, 4));
# ifdef __USE_MISC
/* Read a group entry from STREAM. This function is not standardized
@@ -161,7 +164,8 @@ extern int getgrnam_r (const char *__restrict __name,
extern int fgetgrent_r (FILE *__restrict __stream,
struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
- struct group **__restrict __result);
+ struct group **__restrict __result)
+ __attr_access ((__write_only__, 3, 4));
# endif
#endif /* POSIX or reentrant */