libzfs: diff: stream_bytes: use fputc, %hho formats chars
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rich Ercolani <rincebrain@gmail.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12829
This commit is contained in:
parent
1cfb6ef36e
commit
a72129edcb
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user