util/hexdump: Reorder qemu_hexdump() arguments

qemu_hexdump()'s pointer to the buffer and length of the
buffer are closely related arguments but are widely separated
in the argument list order (also, the format of <stdio.h>
function prototypes is usually to have the FILE* argument
coming first).

Reorder the arguments as "fp, prefix, buf, size" which is
more logical.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200822180950.1343963-3-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Philippe Mathieu-Daudé 2020-08-22 20:09:50 +02:00 committed by Laurent Vivier
parent 67263b33af
commit b42581f5bb
10 changed files with 23 additions and 23 deletions

View file

@ -494,10 +494,10 @@ sec:
g_queue_push_head(&conn->secondary_list, spkt);
if (trace_event_get_state_backends(TRACE_COLO_COMPARE_MISCOMPARE)) {
qemu_hexdump(ppkt->data, stderr,
"colo-compare ppkt", ppkt->size);
qemu_hexdump(spkt->data, stderr,
"colo-compare spkt", spkt->size);
qemu_hexdump(stderr, "colo-compare ppkt",
ppkt->data, ppkt->size);
qemu_hexdump(stderr, "colo-compare spkt",
spkt->data, spkt->size);
}
colo_compare_inconsistency_notify(s);
@ -535,10 +535,10 @@ static int colo_packet_compare_udp(Packet *spkt, Packet *ppkt)
trace_colo_compare_udp_miscompare("primary pkt size", ppkt->size);
trace_colo_compare_udp_miscompare("Secondary pkt size", spkt->size);
if (trace_event_get_state_backends(TRACE_COLO_COMPARE_MISCOMPARE)) {
qemu_hexdump(ppkt->data, stderr, "colo-compare pri pkt",
ppkt->size);
qemu_hexdump(spkt->data, stderr, "colo-compare sec pkt",
spkt->size);
qemu_hexdump(stderr, "colo-compare pri pkt",
ppkt->data, ppkt->size);
qemu_hexdump(stderr, "colo-compare sec pkt",
spkt->data, spkt->size);
}
return -1;
} else {
@ -578,10 +578,10 @@ static int colo_packet_compare_icmp(Packet *spkt, Packet *ppkt)
trace_colo_compare_icmp_miscompare("Secondary pkt size",
spkt->size);
if (trace_event_get_state_backends(TRACE_COLO_COMPARE_MISCOMPARE)) {
qemu_hexdump(ppkt->data, stderr, "colo-compare pri pkt",
ppkt->size);
qemu_hexdump(spkt->data, stderr, "colo-compare sec pkt",
spkt->size);
qemu_hexdump(stderr, "colo-compare pri pkt",
ppkt->data, ppkt->size);
qemu_hexdump(stderr, "colo-compare sec pkt",
spkt->data, spkt->size);
}
return -1;
} else {