event/process: Silence PVS/V547: assuming stream->num_bytes changes

Not familiar with the code, but I assume that loop_poll_events can actually 
change stream->num_bytes, so condition is not always false.
This commit is contained in:
ZyX
2018-04-17 01:49:46 +03:00
parent cb3bb0becb
commit 8cdaac0d80

View File

@@ -358,7 +358,7 @@ static void flush_stream(Process *proc, Stream *stream)
} }
// Stream can be closed if it is empty. // Stream can be closed if it is empty.
if (num_bytes == stream->num_bytes) { if (num_bytes == stream->num_bytes) { // -V547
if (stream->read_cb && !stream->did_eof) { if (stream->read_cb && !stream->did_eof) {
// Stream callback could miss EOF handling if a child keeps the stream // Stream callback could miss EOF handling if a child keeps the stream
// open. But only send EOF if we haven't already. // open. But only send EOF if we haven't already.