diff options
author | Max Kellermann <max@duempel.org> | 2012-10-02 00:00:56 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-10-02 00:20:42 +0200 |
commit | d34e55c370db54ace2543d9801d360dae8e7c494 (patch) | |
tree | 2e947e4ceb98610c3d40579b8157dc1b5273e66e /src/output | |
parent | fbcbcdc0011949339666b2567c987156d47197e8 (diff) | |
download | mpd-d34e55c370db54ace2543d9801d360dae8e7c494.tar.gz mpd-d34e55c370db54ace2543d9801d360dae8e7c494.tar.xz mpd-d34e55c370db54ace2543d9801d360dae8e7c494.zip |
output/recorder: fix write() error check
We can only check for negative values if the variable is signed.
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/recorder_output_plugin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/output/recorder_output_plugin.c b/src/output/recorder_output_plugin.c index 5d098f08f..e2366bf90 100644 --- a/src/output/recorder_output_plugin.c +++ b/src/output/recorder_output_plugin.c @@ -140,9 +140,9 @@ recorder_output_encoder_to_file(struct recorder_output *recorder, size_t position = 0; while (true) { - size_t nbytes = write(recorder->fd, - recorder->buffer + position, - size - position); + ssize_t nbytes = write(recorder->fd, + recorder->buffer + position, + size - position); if (nbytes > 0) { position += (size_t)nbytes; if (position >= size) |