aboutsummaryrefslogtreecommitdiff
path: root/migration/rdma.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-09-28 15:19:57 +0200
committerJuan Quintela <quintela@redhat.com>2023-10-11 11:17:03 +0200
commit1718f238d1ee3c40496a36d6e4dc88ad21a04896 (patch)
treed03deab0ffc80303c5b61ca27469f9b8f360f28b /migration/rdma.c
parente518b0050d41adf764aa06373acf0fbd696b8a0e (diff)
downloadqemu-1718f238d1ee3c40496a36d6e4dc88ad21a04896.zip
qemu-1718f238d1ee3c40496a36d6e4dc88ad21a04896.tar.gz
qemu-1718f238d1ee3c40496a36d6e4dc88ad21a04896.tar.bz2
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>
Diffstat (limited to 'migration/rdma.c')
-rw-r--r--migration/rdma.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/migration/rdma.c b/migration/rdma.c
index 00e3c43..6c0e6cd 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -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__); \
} \