diff options
author | nae202 <nae202@yandex-team.com> | 2024-11-20 12:52:01 +0300 |
---|---|---|
committer | nae202 <nae202@yandex-team.com> | 2024-11-20 13:14:09 +0300 |
commit | 0b9d91e900b52bccd6eabd033acbb57c4ee173fc (patch) | |
tree | 6839ed69fbda4d5214eb418acc4554924bc64160 /util/system/fstat.cpp | |
parent | 878e26057d11cce46b7bc3a6c838209d4686e28b (diff) | |
download | ydb-0b9d91e900b52bccd6eabd033acbb57c4ee173fc.tar.gz |
Part of PR. Style
Часть большого ПР REVIEW:7264088
commit_hash:0f5b03fbbed0ac30f734943309e3ef5cd4d7a30e
Diffstat (limited to 'util/system/fstat.cpp')
-rw-r--r-- | util/system/fstat.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/util/system/fstat.cpp b/util/system/fstat.cpp index cfc5bed323..55d95463cf 100644 --- a/util/system/fstat.cpp +++ b/util/system/fstat.cpp @@ -44,8 +44,9 @@ static ui32 GetWinFileType(DWORD fileAttributes, ULONG reparseTag) { static ui32 GetFileMode(DWORD fileAttributes, ULONG reparseTag) { ui32 mode = 0; - if (fileAttributes == 0xFFFFFFFF) + if (fileAttributes == 0xFFFFFFFF) { return mode; + } mode |= GetWinFileType(fileAttributes, reparseTag); @@ -229,8 +230,9 @@ bool TFileStat::IsSymlink() const noexcept { i64 GetFileLength(FHANDLE fd) { #if defined(_win_) LARGE_INTEGER pos; - if (!::GetFileSizeEx(fd, &pos)) + if (!::GetFileSizeEx(fd, &pos)) { return -1L; + } return pos.QuadPart; #elif defined(_unix_) struct stat statbuf; @@ -252,8 +254,9 @@ i64 GetFileLength(const char* name) { #if defined(_win_) WIN32_FIND_DATA fData; HANDLE h = FindFirstFileA(name, &fData); - if (h == INVALID_HANDLE_VALUE) + if (h == INVALID_HANDLE_VALUE) { return -1; + } FindClose(h); return (((i64)fData.nFileSizeHigh) * (i64(MAXDWORD) + 1)) + (i64)fData.nFileSizeLow; #elif defined(_unix_) |