migration/rdma: Return -1 instead of negative errno code
commit8c6513f75048e6cc55d9e6db2c2e0e7b02a166bc
authorMarkus Armbruster <armbru@redhat.com>
Thu, 28 Sep 2023 13:19:51 +0000 (28 15:19 +0200)
committerJuan Quintela <quintela@redhat.com>
Wed, 11 Oct 2023 09:17:03 +0000 (11 11:17 +0200)
tree7de27256b62b83fa0cf1b2feca5e881eccafb00a
parent07249822212ec56484ecfb5594d2ec94c84961fa
migration/rdma: Return -1 instead of negative errno code

Several functions return negative errno codes on failure.  Callers
check for specific codes exactly never.  For some of the functions,
callers couldn't check even if they wanted to, because the functions
also return negative values that aren't errno codes, leaving readers
confused on what the function actually returns.

Clean up and simplify: return -1 instead of negative errno code.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20230928132019.2544702-26-armbru@redhat.com>
migration/rdma.c