aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-09 08:15:18 +0800
committerGitHub <noreply@github.com>2022-03-09 08:15:18 +0800
commit205b3765f2c04e3839b15a8d1ce79bd7ea8e4d3d (patch)
treeb3db8da594fd829224607a11d21b43b3d329b76f /src/nvim/fileio.c
parentf33cea4682340ea2b622fa879dd6fca2c80ea1d5 (diff)
parentff032f2710974dcf5930187f1925534da93db199 (diff)
downloadrneovim-205b3765f2c04e3839b15a8d1ce79bd7ea8e4d3d.tar.gz
rneovim-205b3765f2c04e3839b15a8d1ce79bd7ea8e4d3d.tar.bz2
rneovim-205b3765f2c04e3839b15a8d1ce79bd7ea8e4d3d.zip
Merge pull request #17622 from dundargoc/refactor/clang-tidy/remove-redundant-casts
refactor/clang tidy/remove redundant casts
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 965aa8749d..c5a89d3371 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -3911,13 +3911,13 @@ static int check_mtime(buf_T *buf, FileInfo *file_info)
static bool time_differs(const FileInfo *file_info, long mtime, long mtime_ns) FUNC_ATTR_CONST
{
- return (long)file_info->stat.st_mtim.tv_nsec != mtime_ns
+ return file_info->stat.st_mtim.tv_nsec != mtime_ns
#if defined(__linux__) || defined(MSWIN)
// On a FAT filesystem, esp. under Linux, there are only 5 bits to store
// the seconds. Since the roundoff is done when flushing the inode, the
// time may change unexpectedly by one second!!!
- || (long)file_info->stat.st_mtim.tv_sec - mtime > 1
- || mtime - (long)file_info->stat.st_mtim.tv_sec > 1;
+ || file_info->stat.st_mtim.tv_sec - mtime > 1
+ || mtime - file_info->stat.st_mtim.tv_sec > 1;
#else
|| (long)file_info->stat.st_mtim.tv_sec != mtime;
#endif