From: Alejandro Colomar Date: Mon, 11 Dec 2023 13:16:31 +0000 (+0100) Subject: lib/: get[u]long(): Use ATTR_ACCESS() instead of /*@out@*/ X-Git-Tag: 4.15.0-rc1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=561448443f56cb968eb05e42390ae7f552b388ab;p=thirdparty%2Fshadow.git lib/: get[u]long(): Use ATTR_ACCESS() instead of /*@out@*/ Link: Cc: Serge Hallyn Signed-off-by: Alejandro Colomar --- diff --git a/lib/getlong.c b/lib/getlong.c index 1f85f2885..4c6e376c5 100644 --- a/lib/getlong.c +++ b/lib/getlong.c @@ -21,7 +21,7 @@ * It supports decimal, hexadecimal or octal representations. */ int -getlong(const char *numstr, /*@out@*/long *result) +getlong(const char *numstr, long *result) { char *endptr; long val; diff --git a/lib/getulong.c b/lib/getulong.c index 613c657b4..690525551 100644 --- a/lib/getulong.c +++ b/lib/getulong.c @@ -21,7 +21,7 @@ * It supports decimal, hexadecimal or octal representations. */ int -getulong(const char *numstr, /*@out@*/unsigned long *result) +getulong(const char *numstr, unsigned long *result) { char *endptr; unsigned long val; diff --git a/lib/prototypes.h b/lib/prototypes.h index 804ad96fe..4ba943645 100644 --- a/lib/prototypes.h +++ b/lib/prototypes.h @@ -153,7 +153,8 @@ extern int get_gid (const char *gidstr, gid_t *gid); extern /*@only@*//*@null@*/struct group *getgr_nam_gid (/*@null@*/const char *grname); /* getlong.c */ -extern int getlong (const char *numstr, /*@out@*/long *result); +ATTR_ACCESS(write_only, 2) +extern int getlong(const char *numstr, long *result); /* get_pid.c */ extern int get_pid (const char *pidstr, pid_t *pid); @@ -172,7 +173,8 @@ extern time_t gettime (void); extern int get_uid (const char *uidstr, uid_t *uid); /* getulong.c */ -extern int getulong (const char *numstr, /*@out@*/unsigned long *result); +ATTR_ACCESS(write_only, 2) +extern int getulong(const char *numstr, unsigned long *result); /* fputsx.c */ ATTR_ACCESS(write_only, 1, 2)