24 lines
665 B
Diff
24 lines
665 B
Diff
From: Steinar H. Gunderson <steinar+git@gunderson.no>
|
|
Date: Wed, 7 Apr 2021 20:04:49 +0000 (+0200)
|
|
Subject: Fix a typo in try_complete_pread().
|
|
X-Git-Url: https://git.sesse.net/?p=plocate;a=commitdiff_plain;h=5306f44831f52aadc17ef229a8e577147c68137b
|
|
|
|
Fix a typo in try_complete_pread().
|
|
|
|
Pointed out by Taj Khattra.
|
|
---
|
|
|
|
diff --git a/complete_pread.cpp b/complete_pread.cpp
|
|
index e805cf6..3b36945 100644
|
|
--- a/complete_pread.cpp
|
|
+++ b/complete_pread.cpp
|
|
@@ -15,7 +15,7 @@ bool try_complete_pread(int fd, void *ptr, size_t len, off_t offset)
|
|
}
|
|
ptr = reinterpret_cast<char *>(ptr) + ret;
|
|
len -= ret;
|
|
- offset -= ret;
|
|
+ offset += ret;
|
|
}
|
|
return true;
|
|
}
|