From: Frederic Berat Date: Tue, 20 Jun 2023 18:19:03 +0000 (+0200) Subject: debug/readlink{, at}_chk.c: Harmonize declaration and definition X-Git-Tag: glibc-2.38~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0371c236233ee7e491937435952c60f50f7e45ea;p=thirdparty%2Fglibc.git 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 --- diff --git a/debug/readlink_chk.c b/debug/readlink_chk.c index c491db2225e..99dea40c7bc 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 03feac92eca..163dec8b80f 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)