[prev in list] [next in list] [prev in thread] [next in thread]
List: glibc-cvs
Subject: [glibc] debug/readlink{, at}_chk.c: Harmonize declaration and definition
From: Siddhesh Poyarekar via Glibc-cvs <glibc-cvs () sourceware ! org>
Date: 2023-06-22 4:53:46
Message-ID: 20230622045346.D93BB3858C36 () sourceware ! org
[Download RAW message or body]
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)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic