summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorC. McEnroe2021-01-23 12:34:30 -0500
committerC. McEnroe2021-01-23 12:34:30 -0500
commitbc29082f9d904b1996cb269d70e474b91cc608ef (patch)
treefb5dd8ced5c227ccc58b94d0d267d0a83d73c3e9
parentbc3bd956481131a15dcae95eb818b3b3ccc7ed79 (diff)
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
-rw-r--r--buffer.c2
1 files changed, 1 insertions, 1 deletions
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;