public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] debug/readlink{, at}_chk.c: Harmonize declaration and definition
@ 2023-06-22 4:53 Siddhesh Poyarekar
0 siblings, 0 replies; only message in thread
From: Siddhesh Poyarekar @ 2023-06-22 4:53 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0371c236233ee7e491937435952c60f50f7e45ea
commit 0371c236233ee7e491937435952c60f50f7e45ea
Author: Frederic Berat <fberat@redhat.com>
Date: Tue Jun 20 20:19:03 2023 +0200
debug/readlink{, at}_chk.c: Harmonize declaration and definition
The declaration and definition of these routines aren't consistent.
Make the definition of __readlink_chk and __readlinkat_chk match the
declaration of the routines they fortify. While there are no problems
today this avoids any future potential problems related to the mismatch.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diff:
---
debug/readlink_chk.c | 3 ++-
debug/readlinkat_chk.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/debug/readlink_chk.c b/debug/readlink_chk.c
index c491db2225..99dea40c7b 100644
--- a/debug/readlink_chk.c
+++ b/debug/readlink_chk.c
@@ -24,7 +24,8 @@
ssize_t
-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen)
+__readlink_chk (const char *__restrict path, char *__restrict buf, size_t len,
+ size_t buflen)
{
if (len > buflen)
__chk_fail ();
diff --git a/debug/readlinkat_chk.c b/debug/readlinkat_chk.c
index 03feac92ec..163dec8b80 100644
--- a/debug/readlinkat_chk.c
+++ b/debug/readlinkat_chk.c
@@ -20,7 +20,8 @@
ssize_t
-__readlinkat_chk (int fd, const char *path, void *buf, size_t len,
+__readlinkat_chk (int fd, const char *__restrict path,
+ char *__restrict buf, size_t len,
size_t buflen)
{
if (len > buflen)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-22 4:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-22 4:53 [glibc] debug/readlink{, at}_chk.c: Harmonize declaration and definition Siddhesh Poyarekar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).