From 844cf87a36c297b2b8a5ec67cc1526aae388e6c8 Mon Sep 17 00:00:00 2001 From: James Lee <49257044+juria90@users.noreply.github.com> Date: Fri, 10 Feb 2023 13:31:19 -0800 Subject: [PATCH] Remove duplicated st_ino calculation The deleted `status->st_ino = (((uint64_t)info.nFileIndexHigh) << 32) + info.nFileIndexLow;` is already calculated and assigned in the function `_Py_attribute_data_to_stat()`. So removing the duplicated code. --- Python/fileutils.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/Python/fileutils.c b/Python/fileutils.c index 244bd899b3bd24..22b2257a56d0ec 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -1162,8 +1162,6 @@ _Py_fstat_noraise(int fd, struct _Py_stat_struct *status) } _Py_attribute_data_to_stat(&info, 0, status); - /* specific to fstat() */ - status->st_ino = (((uint64_t)info.nFileIndexHigh) << 32) + info.nFileIndexLow; return 0; #else return fstat(fd, status);