Skip to content
Snippets Groups Projects
Commit a8cc5c53 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Merge branch 'cleanup-fsearch' into 'master'

[fsearch] remove obsolete offset tracking code

See merge request i4/manycore/emper!271
parents e677b305 7f0bf3c4
No related branches found
No related tags found
No related merge requests found
......@@ -37,9 +37,8 @@ void search(const std::string& path) {
}
std::array<char, EMPER_RIPGREP_BUFSIZE> buf;
off_t bytes_searched = 0;
ssize_t bytes_read = emper::io::readFileAndWait(fd, buf.data(), buf.size(), bytes_searched);
ssize_t bytes_read = emper::io::readFileAndWait(fd, buf.data(), buf.size(), 0);
while (bytes_read > 0) {
if (memmem(&buf[0], bytes_read, needle, needle_len)) {
std::array<char, PATH_MAX + 1> outBuf;
......@@ -49,7 +48,6 @@ void search(const std::string& path) {
goto out;
}
bytes_searched += bytes_read;
bytes_read = emper::io::readFileAndWait(fd, buf.data(), buf.size(), -1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment