aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/fstat.cpp
diff options
context:
space:
mode:
authormyltsev <myltsev@yandex-team.ru>2022-02-10 16:46:03 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:03 +0300
commitfc361854fd6ee8d747229b090f0b8018e260d1fb (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/fstat.cpp
parent9166d66c30c23c9e85a7c88185a068987148d23f (diff)
downloadydb-fc361854fd6ee8d747229b090f0b8018e260d1fb.tar.gz
Restoring authorship annotation for <myltsev@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/fstat.cpp')
-rw-r--r--util/system/fstat.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/util/system/fstat.cpp b/util/system/fstat.cpp
index cadd0f4540..81e98cbc6b 100644
--- a/util/system/fstat.cpp
+++ b/util/system/fstat.cpp
@@ -6,7 +6,7 @@
#include <util/folder/path.h>
#include <cerrno>
-
+
#if defined(_win_)
#include "fs_win.h"
@@ -174,11 +174,11 @@ i64 GetFileLength(FHANDLE fd) {
if (::fstat(fd, &statbuf) != 0) {
return -1L;
}
- if (!(statbuf.st_mode & (S_IFREG | S_IFBLK | S_IFCHR))) {
- // st_size only makes sense for regular files or devices
- errno = EINVAL;
- return -1L;
- }
+ if (!(statbuf.st_mode & (S_IFREG | S_IFBLK | S_IFCHR))) {
+ // st_size only makes sense for regular files or devices
+ errno = EINVAL;
+ return -1L;
+ }
return statbuf.st_size;
#else
#error unsupported platform
@@ -199,11 +199,11 @@ i64 GetFileLength(const char* name) {
if (r == -1) {
return -1;
}
- if (!(buf.st_mode & (S_IFREG | S_IFBLK | S_IFCHR))) {
- // st_size only makes sense for regular files or devices
- errno = EINVAL;
- return -1;
- }
+ if (!(buf.st_mode & (S_IFREG | S_IFBLK | S_IFCHR))) {
+ // st_size only makes sense for regular files or devices
+ errno = EINVAL;
+ return -1;
+ }
return (i64)buf.st_size;
#else
#error unsupported platform