projects
/
oweals
/
dinit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34f77d1
)
Fix pointer bug in logging.
author
Davin McCall
<davmac@davmac.org>
Wed, 24 May 2017 08:17:31 +0000
(09:17 +0100)
committer
Davin McCall
<davmac@davmac.org>
Wed, 24 May 2017 08:17:31 +0000
(09:17 +0100)
src/dinit-log.cc
patch
|
blob
|
history
diff --git
a/src/dinit-log.cc
b/src/dinit-log.cc
index e402f6bf2c6112f9174a52f4baeef8597cdf50d5..7a8db587c3fccda77d8b018745097139f6744e2e 100644
(file)
--- a/
src/dinit-log.cc
+++ b/
src/dinit-log.cc
@@
-194,7
+194,7
@@
rearm BufferedLogStream::fd_event(EventLoop_t &loop, int fd, int flags) noexcept
// Do we need the second span?
if (! will_complete && len != log_buffer.get_length()) {
ptr = log_buffer.get_buf_base();
- creptr =
static_cast<char *>(logiov[1].iov_base)
+ log_buffer.get_length() - len;
+ creptr =
ptr
+ log_buffer.get_length() - len;
eptr = std::find(ptr, creptr, '\n');
if (eptr != creptr) {
eptr++; // include '\n'