Skip to content

Commit 2643fac

Browse files
committed
Stylefixes
1 parent c159996 commit 2643fac

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/file.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ std::string file::read(std::error_code& ec) const {
194194
ec = std::error_code(GetLastError(), std::system_category());
195195
}
196196
#else
197-
off_t ret = lseek(handle, 0, SEEK_SET);
198-
if (ret == -1) {
197+
if (lseek(handle, 0, SEEK_SET) == -1) {
199198
ec = std::error_code(errno, std::system_category());
200199
}
201200
#endif
@@ -266,8 +265,7 @@ void file::append(std::string_view content, std::error_code& ec) const {
266265
ec = std::error_code(GetLastError(), std::system_category());
267266
}
268267
#else
269-
off_t ret = lseek(handle, 0, SEEK_END);
270-
if (ret == -1) {
268+
if (lseek(handle, 0, SEEK_END) == -1) {
271269
ec = std::error_code(errno, std::system_category());
272270
}
273271
#endif

0 commit comments

Comments
 (0)