diff options
author | наб <[email protected]> | 2021-12-09 23:42:02 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-12-13 15:50:20 -0800 |
commit | a72129edcb7353f5301096ea9541e8e345f052d4 (patch) | |
tree | 8951d1ec3f503839fc8aa6c31d603077b688579f /lib/libzfs/libzfs_diff.c | |
parent | 1cfb6ef36eb71b9001fb2bd3d509c711cb5d1621 (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]>
Closes #12829
Diffstat (limited to 'lib/libzfs/libzfs_diff.c')
-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); } } } |