diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-28 17:31:52 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-28 17:31:52 +0200 |
commit | edaa3eabd08e616f31b2512e9b7006000d99fd2b (patch) | |
tree | 470962adc2015bb404557ad274a664730aa0065e /src/libmdsserver | |
parent | m (diff) | |
download | mds-edaa3eabd08e616f31b2512e9b7006000d99fd2b.tar.gz mds-edaa3eabd08e616f31b2512e9b7006000d99fd2b.tar.bz2 mds-edaa3eabd08e616f31b2512e9b7006000d99fd2b.tar.xz |
derp
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/libmdsserver')
-rw-r--r-- | src/libmdsserver/mds-message.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libmdsserver/mds-message.c b/src/libmdsserver/mds-message.c index 77cd4a9..705367b 100644 --- a/src/libmdsserver/mds-message.c +++ b/src/libmdsserver/mds-message.c @@ -283,11 +283,9 @@ int mds_message_read(mds_message_t* this, int fd) /* Then read from the file descriptor. */ errno = 0; got = read(fd, this->buffer + this->buffer_ptr, n); + this->buffer_ptr += (size_t)(got < 0 ? 0 : got); if (errno) - { - this->buffer_ptr += (size_t)(got < 0 ? 0 : got); - return -1; - } + return -1; } } |