]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/: fgetsx(): Use ATTR_ACCESS() instead of /*@out@*/
authorAlejandro Colomar <alx@kernel.org>
Mon, 11 Dec 2023 13:10:38 +0000 (14:10 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 15 Jan 2024 19:14:28 +0000 (13:14 -0600)
Link: <https://splint.org/manual/manual.html#undefined>
Cc: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/fputsx.c
lib/prototypes.h

index bb71ab2a0a477cc1c03242ef6bb421c17c57af9e..0f8aeaa2633d15b3afdc25c0cb42a5895d4de017 100644 (file)
@@ -16,7 +16,8 @@
 #ident "$Id$"
 
 
-/*@null@*/char *fgetsx (/*@returned@*/ /*@out@*/char *buf, int cnt, FILE * f)
+/*@null@*/char *
+fgetsx(/*@returned@*/char *buf, int cnt, FILE * f)
 {
        char *cp = buf;
        char *ep;
index 61a9db5e167658540f7815bd4e2882eeac470e13..5131db535a31bd2d47037716be094b35f21ddf67 100644 (file)
@@ -175,7 +175,8 @@ extern int get_uid (const char *uidstr, uid_t *uid);
 extern int getulong (const char *numstr, /*@out@*/unsigned long *result);
 
 /* fputsx.c */
-extern /*@null@*/char *fgetsx (/*@returned@*/ /*@out@*/char *, int, FILE *);
+ATTR_ACCESS(write_only, 1, 2)
+extern /*@null@*/char *fgetsx(/*@returned@*/char *, int, FILE *);
 extern int fputsx (const char *, FILE *);
 
 /* groupio.c */