From: Gary Lockyer Date: Tue, 9 Feb 2021 01:07:53 +0000 (+1300) Subject: s3 lib system: Change signature of sys_proc_fd_path X-Git-Tag: tevent-0.11.0~1781 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6816135a2cdbc91c079de2716a333d774a9adbc5;p=thirdparty%2Fsamba.git s3 lib system: Change signature of sys_proc_fd_path It's always called with sizeof(buf) Signed-off-by: Gary Lockyer Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Feb 9 04:16:43 UTC 2021 on sn-devel-184 --- diff --git a/source3/include/proto.h b/source3/include/proto.h index 16cd587ed30..ab42efeefd9 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -237,7 +237,7 @@ int sys_get_number_of_cores(void); #endif bool sys_have_proc_fds(void); -const char *sys_proc_fd_path(int fd, char *buf, int bufsize); +const char *sys_proc_fd_path(int fd, char *buf, size_t bufsize); struct stat; void init_stat_ex_from_stat (struct stat_ex *dst, diff --git a/source3/lib/system.c b/source3/lib/system.c index 09bdf1fa728..ad525737c5b 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -1068,7 +1068,7 @@ bool sys_have_proc_fds(void) return have_proc_fds; } -const char *sys_proc_fd_path(int fd, char *buf, int bufsize) +const char *sys_proc_fd_path(int fd, char *buf, size_t bufsize) { int written;