From 7c1576cfb65a958ff188a585441bdf9349bc0e2e Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 11 Dec 2023 14:10:38 +0100 Subject: [PATCH] lib/: fgetsx(): Use ATTR_ACCESS() instead of /*@out@*/ Link: Cc: Serge Hallyn Signed-off-by: Alejandro Colomar --- lib/fputsx.c | 3 ++- lib/prototypes.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/fputsx.c b/lib/fputsx.c index bb71ab2a..0f8aeaa2 100644 --- a/lib/fputsx.c +++ b/lib/fputsx.c @@ -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; diff --git a/lib/prototypes.h b/lib/prototypes.h index 61a9db5e..5131db53 100644 --- a/lib/prototypes.h +++ b/lib/prototypes.h @@ -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 */