We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c159996 commit 2643facCopy full SHA for 2643fac
src/file.cpp
@@ -194,8 +194,7 @@ std::string file::read(std::error_code& ec) const {
194
ec = std::error_code(GetLastError(), std::system_category());
195
}
196
#else
197
- off_t ret = lseek(handle, 0, SEEK_SET);
198
- if (ret == -1) {
+ if (lseek(handle, 0, SEEK_SET) == -1) {
199
ec = std::error_code(errno, std::system_category());
200
201
#endif
@@ -266,8 +265,7 @@ void file::append(std::string_view content, std::error_code& ec) const {
266
265
267
268
269
- off_t ret = lseek(handle, 0, SEEK_END);
270
+ if (lseek(handle, 0, SEEK_END) == -1) {
271
272
273
0 commit comments