From c366429e57c4cd5f6f98cf69de51e2853cc14d75 Mon Sep 17 00:00:00 2001 From: Peter Oberparleiter Date: Mon, 5 Feb 2024 14:40:25 +0100 Subject: [PATCH] libutil: fix hexdump indentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current implementation of util_hexdump_grp() enforces a minimum indentation of 1 space which may not be suitable for all users. Fix this by allowing a true zero indentation level. Reviewed-by: Jan Höppner Signed-off-by: Peter Oberparleiter Signed-off-by: Steffen Eiden --- libutil/util_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libutil/util_base.c b/libutil/util_base.c index 802ca773..4e8b6111 100644 --- a/libutil/util_base.c +++ b/libutil/util_base.c @@ -27,7 +27,7 @@ void util_hexdump_grp(FILE *fh, const char *tag, const void *data, int grp, for (i = 0; i < count; i++) { if (first) { - fprintf(fh, "%*s", indent, " "); + fprintf(fh, "%*s", indent, ""); if (tag) fprintf(fh, "%s: ", tag); fprintf(fh, "%08x: ", i);