error: Consistently name Error * objects err, and not errp
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1450452927-8346-25-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
24da21f265
commit
533fdaedeb
@ -65,7 +65,7 @@ ivshmem_server_parse_args(IvshmemServerArgs *args, int argc, char *argv[])
|
||||
{
|
||||
int c;
|
||||
unsigned long long v;
|
||||
Error *errp = NULL;
|
||||
Error *err = NULL;
|
||||
|
||||
while ((c = getopt(argc, argv,
|
||||
"h" /* help */
|
||||
@ -104,9 +104,9 @@ ivshmem_server_parse_args(IvshmemServerArgs *args, int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 'l': /* shm_size */
|
||||
parse_option_size("shm_size", optarg, &args->shm_size, &errp);
|
||||
if (errp) {
|
||||
error_report_err(errp);
|
||||
parse_option_size("shm_size", optarg, &args->shm_size, &err);
|
||||
if (err) {
|
||||
error_report_err(err);
|
||||
ivshmem_server_usage(argv[0], 1);
|
||||
}
|
||||
break;
|
||||
|
32
hmp.c
32
hmp.c
@ -2078,11 +2078,11 @@ void hmp_rocker(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
const char *name = qdict_get_str(qdict, "name");
|
||||
RockerSwitch *rocker;
|
||||
Error *errp = NULL;
|
||||
Error *err = NULL;
|
||||
|
||||
rocker = qmp_query_rocker(name, &errp);
|
||||
if (errp != NULL) {
|
||||
hmp_handle_error(mon, &errp);
|
||||
rocker = qmp_query_rocker(name, &err);
|
||||
if (err != NULL) {
|
||||
hmp_handle_error(mon, &err);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2097,11 +2097,11 @@ void hmp_rocker_ports(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
RockerPortList *list, *port;
|
||||
const char *name = qdict_get_str(qdict, "name");
|
||||
Error *errp = NULL;
|
||||
Error *err = NULL;
|
||||
|
||||
list = qmp_query_rocker_ports(name, &errp);
|
||||
if (errp != NULL) {
|
||||
hmp_handle_error(mon, &errp);
|
||||
list = qmp_query_rocker_ports(name, &err);
|
||||
if (err != NULL) {
|
||||
hmp_handle_error(mon, &err);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2126,11 +2126,11 @@ void hmp_rocker_of_dpa_flows(Monitor *mon, const QDict *qdict)
|
||||
RockerOfDpaFlowList *list, *info;
|
||||
const char *name = qdict_get_str(qdict, "name");
|
||||
uint32_t tbl_id = qdict_get_try_int(qdict, "tbl_id", -1);
|
||||
Error *errp = NULL;
|
||||
Error *err = NULL;
|
||||
|
||||
list = qmp_query_rocker_of_dpa_flows(name, tbl_id != -1, tbl_id, &errp);
|
||||
if (errp != NULL) {
|
||||
hmp_handle_error(mon, &errp);
|
||||
list = qmp_query_rocker_of_dpa_flows(name, tbl_id != -1, tbl_id, &err);
|
||||
if (err != NULL) {
|
||||
hmp_handle_error(mon, &err);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2276,12 +2276,12 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict)
|
||||
RockerOfDpaGroupList *list, *g;
|
||||
const char *name = qdict_get_str(qdict, "name");
|
||||
uint8_t type = qdict_get_try_int(qdict, "type", 9);
|
||||
Error *errp = NULL;
|
||||
Error *err = NULL;
|
||||
bool set = false;
|
||||
|
||||
list = qmp_query_rocker_of_dpa_groups(name, type != 9, type, &errp);
|
||||
if (errp != NULL) {
|
||||
hmp_handle_error(mon, &errp);
|
||||
list = qmp_query_rocker_of_dpa_groups(name, type != 9, type, &err);
|
||||
if (err != NULL) {
|
||||
hmp_handle_error(mon, &err);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
struct do_nmi_s {
|
||||
int cpu_index;
|
||||
Error *errp;
|
||||
Error *err;
|
||||
bool handled;
|
||||
};
|
||||
|
||||
@ -40,8 +40,8 @@ static int do_nmi(Object *o, void *opaque)
|
||||
NMIClass *nc = NMI_GET_CLASS(n);
|
||||
|
||||
ns->handled = true;
|
||||
nc->nmi_monitor_handler(n, ns->cpu_index, &ns->errp);
|
||||
if (ns->errp) {
|
||||
nc->nmi_monitor_handler(n, ns->cpu_index, &ns->err);
|
||||
if (ns->err) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -59,13 +59,13 @@ void nmi_monitor_handle(int cpu_index, Error **errp)
|
||||
{
|
||||
struct do_nmi_s ns = {
|
||||
.cpu_index = cpu_index,
|
||||
.errp = NULL,
|
||||
.err = NULL,
|
||||
.handled = false
|
||||
};
|
||||
|
||||
nmi_children(object_get_root(), &ns);
|
||||
if (ns.handled) {
|
||||
error_propagate(errp, ns.errp);
|
||||
error_propagate(errp, ns.err);
|
||||
} else {
|
||||
error_setg(errp, QERR_UNSUPPORTED);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ int recv_all(int fd, void *buf, int len1, bool single_read);
|
||||
/* callback function for nonblocking connect
|
||||
* valid fd on success, negative error code on failure
|
||||
*/
|
||||
typedef void NonBlockingConnectHandler(int fd, Error *errp, void *opaque);
|
||||
typedef void NonBlockingConnectHandler(int fd, Error *err, void *opaque);
|
||||
|
||||
InetSocketAddress *inet_parse(const char *str, Error **errp);
|
||||
int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp);
|
||||
|
@ -81,7 +81,7 @@ static void test_visitor_out_intList(TestOutputVisitorData *data,
|
||||
3, 4, 5, 6, 11, 12, 13, 21, 22, INT64_MAX - 1, INT64_MAX};
|
||||
intList *list = NULL, **tmp = &list;
|
||||
int i;
|
||||
Error *errp = NULL;
|
||||
Error *err = NULL;
|
||||
char *str;
|
||||
|
||||
for (i = 0; i < sizeof(value) / sizeof(value[0]); i++) {
|
||||
@ -90,8 +90,8 @@ static void test_visitor_out_intList(TestOutputVisitorData *data,
|
||||
tmp = &(*tmp)->next;
|
||||
}
|
||||
|
||||
visit_type_intList(data->ov, &list, NULL, &errp);
|
||||
g_assert(errp == NULL);
|
||||
visit_type_intList(data->ov, &list, NULL, &err);
|
||||
g_assert(err == NULL);
|
||||
|
||||
str = string_output_get_string(data->sov);
|
||||
g_assert(str != NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user