Fix incorrect length calculation

sizeof char pointer != sizeof string literal.
This commit is contained in:
Nikita Popov 2018-07-20 17:47:53 +02:00
parent fb0faf0208
commit 6e2c54d3e7

View file

@ -420,7 +420,7 @@ static inline ssize_t zlog_stream_unbuffered_write(
append = NULL; append = NULL;
} else { } else {
append = "..."; append = "...";
append_len = sizeof(append) - 1; append_len = sizeof("...") - 1;
len = zlog_limit - stream->len - append_len; len = zlog_limit - stream->len - append_len;
} }
} }