From 4f952642b6afcf6471bac9fe15ffe8e6c429b084 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 4 Dec 2023 13:43:49 +0100 Subject: string_copying.7: Use fwrite(3) to print character sequences Suggested-by: Paul Eggert Signed-off-by: Alejandro Colomar --- man7/string_copying.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man7/string_copying.7 b/man7/string_copying.7 index 31dd2cb8b..de8b49471 100644 --- a/man7/string_copying.7 +++ b/man7/string_copying.7 @@ -652,7 +652,7 @@ char buf[NITEMS(u->ut_user)]; p = buf; p = mempcpy(p, u->ut_user, strnlen(u->ut_user, NITEMS(u->ut_user))); len = p \- buf; -printf("%.*s\en", (int) len, buf); +fwrite(buf, 1, len, stdout); .EE .\" ----- EXAMPLES :: stpcpy(mempcpy(dst, src, strnlen(src, NITEMS(src))), "") .TP @@ -684,7 +684,7 @@ p = mempcpy(p, "Hello ", 6); p = mempcpy(p, "world", 5); p = mempcpy(p, "!", 1); len = p \- buf; -printf("%.*s\en", (int) len, buf); +fwrite(buf, 1, len, stdout); .EE .\" ----- EXAMPLES :: stpcpy(mempcpy(), "") ---------------------------/ .TP -- cgit v1.2.3