nbd/client: refactor nbd_receive_reply
commitba8456442b597848fb5585273c47de8476c3a0c1
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 4 Aug 2017 15:14:26 +0000 (4 18:14 +0300)
committerEric Blake <eblake@redhat.com>
Wed, 30 Aug 2017 18:00:38 +0000 (30 13:00 -0500)
treee47b423473219963cbd52950618dc59f302f0b49
parentab01df1fe21c013d1fd9e3f4c782430741c7dd33
nbd/client: refactor nbd_receive_reply

Refactor nbd_receive_reply to return 1 on success, 0 on eof, when no
data was read and <0 for other cases, because returned size of read
data is not actually used.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20170804151440.320927-4-vsementsov@virtuozzo.com>
[eblake: tweak function comments]
Signed-off-by: Eric Blake <eblake@redhat.com>
include/block/nbd.h
nbd/client.c