To avoid callsites with optional output having to NULL guard. Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> --- Noting in-tree is affected by this yet, but I though I'd get this out of the way straight-up rather than elongate other series.
util/hexdump.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/hexdump.c b/util/hexdump.c index 969b340..b607236 100644 --- a/util/hexdump.c +++ b/util/hexdump.c @@ -19,6 +19,9 @@ void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size) { unsigned int b; + if (!fp) { + return; + } for (b = 0; b < size; b++) { if ((b % 16) == 0) { fprintf(fp, "%s: %04x:", prefix, b); -- 2.0.1.1.gfbfc394