Index: remoting/host/linux/audio_pipe_reader.cc |
diff --git a/remoting/host/linux/audio_pipe_reader.cc b/remoting/host/linux/audio_pipe_reader.cc |
index 82d832e24d6cd4378b4278090c6be8435fa47782..12ae46006115147be403446a067bbd217de6dbe3 100644 |
--- a/remoting/host/linux/audio_pipe_reader.cc |
+++ b/remoting/host/linux/audio_pipe_reader.cc |
@@ -145,10 +145,10 @@ void AudioPipeReader::DoCapture() { |
while (pos < data.size()) { |
int read_result = HANDLE_EINTR( |
read(pipe_fd_, string_as_array(&data) + pos, data.size() - pos)); |
- if (read_result >= 0) { |
+ if (read_result > 0) { |
pos += read_result; |
} else { |
- if (errno != EWOULDBLOCK && errno != EAGAIN) |
+ if (read_result < 0 && errno != EWOULDBLOCK && errno != EAGAIN) |
PLOG(ERROR) << "read"; |
Lambros
2013/01/02 22:51:28
optional: PLOG_IF(ERROR, condition) <<..
Sergey Ulanov
2013/01/02 23:02:20
I don't think PLOG_IF() would make this code more
|
break; |
} |