From bc29082f9d904b1996cb269d70e474b91cc608ef Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 23 Jan 2021 12:34:30 -0500 Subject: Remove use of "%n" to appease de Raadt Sure, it was completely unnecessary, but I resent being told how to use snprintf. https://cvsweb.openbsd.org/src/lib/libc/stdio/vfprintf.c?rev=1.79&content-type=text/x-cvsweb-markup --- buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buffer.c b/buffer.c index ef175b8..41a84cc 100644 --- a/buffer.c +++ b/buffer.c @@ -185,7 +185,7 @@ static int flow(struct Lines *hard, int cols, const struct Line *soft) { if (!line->str) err(EX_OSERR, "malloc"); struct Cat cat = { line->str, cap, 0 }; - catf(&cat, "%*s%n", align, "", &width); + catf(&cat, "%*s", (width = align), ""); styleCat(&cat, wrapStyle); str = &line->str[cat.len]; style = wrapStyle; -- cgit 1.4.1