refactor: remove redundant casts

This commit is contained in:
Dundar Göc
2022-03-06 12:40:31 +01:00
parent 918ab6bf00
commit ff032f2710
14 changed files with 28 additions and 30 deletions

View File

@@ -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