migration/rdma: Delete inappropriate error_report() in macro ERROR()
Functions that use an Error **errp parameter to return errors should not also report them to the user, because reporting is the caller's job. When the caller does, the error is reported twice. When it doesn't (because it recovered from the error), there is no error to report, i.e. the report is bogus. Macro ERROR() violates this principle. Delete the error_report() there. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com> Tested-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-32-armbru@redhat.com>
This commit is contained in:
parent
e518b0050d
commit
1718f238d1
@ -40,12 +40,8 @@
|
||||
#include "options.h"
|
||||
#include <poll.h>
|
||||
|
||||
/*
|
||||
* Print and error on both the Monitor and the Log file.
|
||||
*/
|
||||
#define ERROR(errp, fmt, ...) \
|
||||
do { \
|
||||
fprintf(stderr, "RDMA ERROR: " fmt "\n", ## __VA_ARGS__); \
|
||||
if (errp && (*(errp) == NULL)) { \
|
||||
error_setg(errp, "RDMA ERROR: " fmt, ## __VA_ARGS__); \
|
||||
} \
|
||||
|
Loading…
x
Reference in New Issue
Block a user