Commit d34e55c3 authored by Max Kellermann's avatar Max Kellermann

output/recorder: fix write() error check

We can only check for negative values if the variable is signed.
parent fbcbcdc0
ver 0.17.3 (2012/??/??) ver 0.17.3 (2012/??/??)
* output: * output:
- recorder: fix I/O error check
- shout: fix memory leak in error handler - shout: fix memory leak in error handler
ver 0.17.2 (2012/09/30) ver 0.17.2 (2012/09/30)
......
...@@ -140,7 +140,7 @@ recorder_output_encoder_to_file(struct recorder_output *recorder, ...@@ -140,7 +140,7 @@ recorder_output_encoder_to_file(struct recorder_output *recorder,
size_t position = 0; size_t position = 0;
while (true) { while (true) {
size_t nbytes = write(recorder->fd, ssize_t nbytes = write(recorder->fd,
recorder->buffer + position, recorder->buffer + position,
size - position); size - position);
if (nbytes > 0) { if (nbytes > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment