nbd/server: Simplify nbd_negotiate_options loop
commit8cbee49ed7348e9b2b708d75c8ff8941032cb488
authorEric Blake <eblake@redhat.com>
Fri, 27 Oct 2017 10:40:30 +0000 (27 12:40 +0200)
committerEric Blake <eblake@redhat.com>
Mon, 30 Oct 2017 20:07:59 +0000 (30 21:07 +0100)
tree5aad383da19b9d5dfff243539fa6c16be9f80d14
parent8fb48b8b38a895cbb17a601829603365c4938f60
nbd/server: Simplify nbd_negotiate_options loop

Instead of making each caller check whether a transmission error
occurred, we can sink a common error check to the end of the loop.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171027104037.8319-6-eblake@redhat.com>
[eblake: squash in compiler warning fix]
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
nbd/server.c