Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold856 committed Oct 3, 2024
1 parent 56ebadf commit 516ecb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wpiutil/src/main/native/cpp/FileLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ FileLogger::FileLogger(std::string_view file,
char eventBuf[sizeof(struct inotify_event) + NAME_MAX + 1];
lseek(m_fileHandle, 0, SEEK_END);
while (read(m_inotifyHandle, eventBuf, sizeof(eventBuf)) > 0) {
while ((bufLen = read(m_fileHandle, buf, sizeof(buf)) > 0)) {
while ((int bufLen = read(m_fileHandle, buf, sizeof(buf)) > 0)) {
callback(std::string_view{buf, static_cast<size_t>(bufLen)});
bufLen = read(m_fileHandle, buf, sizeof(buf));
}
Expand Down

0 comments on commit 516ecb3

Please sign in to comment.