git: d41dfdb6f413 - stable/13 - linux(4): Delete a useless variable in getdents64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Aug 2023 14:24:17 UTC
The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=d41dfdb6f413ab3acba2897c7c992fbbd271382e commit d41dfdb6f413ab3acba2897c7c992fbbd271382e Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-07-18 21:44:16 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-08-07 14:22:58 +0000 linux(4): Delete a useless variable in getdents64 MFC after: 2 weeks (cherry picked from commit b27f3237c82bde866cb24f7299eaa356e8b29eb2) --- sys/compat/linux/linux_file.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 249034231c36..da492ec4c4cb 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -526,7 +526,6 @@ linux_getdents64(struct thread *td, struct linux_getdents64_args *args) int len, reclen; /* BSD-format */ caddr_t outp; /* Linux-format */ int resid, linuxreclen; /* Linux-format */ - caddr_t lbuf; /* Linux-format */ off_t base; struct l_dirent64 *linux_dirent64; int buflen, error; @@ -542,7 +541,8 @@ linux_getdents64(struct thread *td, struct linux_getdents64_args *args) goto out1; } - lbuf = malloc(LINUX_RECLEN64(LINUX_NAME_MAX), M_TEMP, M_WAITOK | M_ZERO); + linux_dirent64 = malloc(LINUX_RECLEN64(LINUX_NAME_MAX), M_TEMP, + M_WAITOK | M_ZERO); len = td->td_retval[0]; inp = buf; @@ -563,7 +563,6 @@ linux_getdents64(struct thread *td, struct linux_getdents64_args *args) goto out; } - linux_dirent64 = (struct l_dirent64*)lbuf; linux_dirent64->d_ino = bdp->d_fileno; linux_dirent64->d_off = bdp->d_off; linux_dirent64->d_reclen = linuxreclen; @@ -585,7 +584,7 @@ linux_getdents64(struct thread *td, struct linux_getdents64_args *args) td->td_retval[0] = retval; out: - free(lbuf, M_TEMP); + free(linux_dirent64, M_TEMP); out1: free(buf, M_TEMP); return (error);