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>
This commit is contained in:
Frederic Berat 2023-06-20 20:19:03 +02:00 committed by Siddhesh Poyarekar
parent 04d85febb9
commit 0371c23623
2 changed files with 4 additions and 2 deletions

View File

@ -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 ();

View File

@ -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)