diff options
Diffstat (limited to 'src/shared/id128-print.c')
-rw-r--r-- | src/shared/id128-print.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/shared/id128-print.c b/src/shared/id128-print.c index f232767adf..c9509b28f0 100644 --- a/src/shared/id128-print.c +++ b/src/shared/id128-print.c @@ -11,12 +11,10 @@ #include "terminal-util.h" int id128_pretty_print_sample(const char *name, sd_id128_t id) { - _cleanup_free_ char *man_link = NULL, *mod_link = NULL; - const char *on, *off; - unsigned i; + _cleanup_free_ char *man_link = NULL, *mod_link = NULL; - on = ansi_highlight(); - off = ansi_normal(); + const char *on = ansi_highlight(), + *off = ansi_normal(); if (terminal_urlify("man:systemd-id128(1)", "systemd-id128(1)", &man_link) < 0) return log_oom(); @@ -34,8 +32,8 @@ int id128_pretty_print_sample(const char *name, sd_id128_t id) { on, SD_ID128_FORMAT_VAL(id), off, man_link, on, name); - for (i = 0; i < 16; i++) - printf("%02x%s", id.bytes[i], i != 15 ? "," : ""); + for (size_t i = 0; i < 16; i++) + printf("%02x%s", id.bytes[i], i < 15 ? "," : ""); printf(")%s\n\n", off); printf("As Python constant:\n" |