diff options
author | наб <[email protected]> | 2021-12-09 23:42:02 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-04-01 09:58:45 -0700 |
commit | 7fbb90feeab7b8a61875e9ba1ec136125e8177cc (patch) | |
tree | d3a7f382db6bff4a72bb25a6d50c8a0be47a9e7a /lib | |
parent | 5a21214be84e4b00f419220e4da51f16cee13cad (diff) |
libzfs: diff: stream_bytes: use fputc, %hho formats chars
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Rich Ercolani <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Upstream-commit: a72129edcb7353f5301096ea9541e8e345f052d4
Closes #12829
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_diff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libzfs/libzfs_diff.c b/lib/libzfs/libzfs_diff.c index b721a9fd9..57a7c1556 100644 --- a/lib/libzfs/libzfs_diff.c +++ b/lib/libzfs/libzfs_diff.c @@ -122,9 +122,9 @@ stream_bytes(FILE *fp, const char *string) while ((c = *string++) != '\0') { if (c > ' ' && c != '\\' && c < '\177') { - (void) fprintf(fp, "%c", c); + (void) fputc(c, fp); } else { - (void) fprintf(fp, "\\%04o", (uint8_t)c); + (void) fprintf(fp, "\\%04hho", (uint8_t)c); } } } |