nbd: Refactor conversion to errno to silence checkpatch
commit8b34a9dbc3f2c0afe3450cb20b94cc30f450e77b
authorEric Blake <eblake@redhat.com>
Fri, 14 Oct 2016 18:33:15 +0000 (14 13:33 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 2 Nov 2016 08:28:56 +0000 (2 09:28 +0100)
treee77e9f41f15c8fd58941b4f3e846b6006a5c287d
parentc203c59ad9dc677b27e00ba76d221fd7e93c1aa6
nbd: Refactor conversion to errno to silence checkpatch

Checkpatch complains that 'return EINVAL' is usually wrong
(since we tend to favor 'return -EINVAL').  But it is a
false positive for nbd_errno_to_system_errno().  Since NBD
may add future defined wire values, refactor the code to
keep checkpatch happy.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1476469998-28592-14-git-send-email-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
nbd/client.c