From c03eedde5416e2894ec068f4b17d925e962be676 Mon Sep 17 00:00:00 2001 From: Peter Marschall Date: Thu, 2 Jun 2011 18:43:27 +0200 Subject: [PATCH] opensc-explorer: use util_hex_dump() in do_info() Use standard function util_hex_dump() in do_info() instead of enumerating lists of bytes ourselves. Signed-off-by: Peter Marschall --- src/tools/opensc-explorer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c index 2b836141..6f2ec22d 100644 --- a/src/tools/opensc-explorer.c +++ b/src/tools/opensc-explorer.c @@ -677,14 +677,12 @@ static int do_info(int argc, char **argv) if (file->prop_attr_len) { printf("%-25s", "Proprietary attributes:"); - for (i = 0; i < file->prop_attr_len; i++) - printf("%02X ", file->prop_attr[i]); + util_hex_dump(stdout, file->prop_attr, file->prop_attr_len, " "); printf("\n"); } if (file->sec_attr_len) { printf("%-25s", "Security attributes:"); - for (i = 0; i < file->sec_attr_len; i++) - printf("%02X ", file->sec_attr[i]); + util_hex_dump(stdout, file->sec_attr, file->sec_attr_len, " "); printf("\n"); } printf("\n");