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-markupweechat-hashes
parent
bc3bd95648
commit
bc29082f9d
2
buffer.c
2
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");
|
if (!line->str) err(EX_OSERR, "malloc");
|
||||||
|
|
||||||
struct Cat cat = { line->str, cap, 0 };
|
struct Cat cat = { line->str, cap, 0 };
|
||||||
catf(&cat, "%*s%n", align, "", &width);
|
catf(&cat, "%*s", (width = align), "");
|
||||||
styleCat(&cat, wrapStyle);
|
styleCat(&cat, wrapStyle);
|
||||||
str = &line->str[cat.len];
|
str = &line->str[cat.len];
|
||||||
style = wrapStyle;
|
style = wrapStyle;
|
||||||
|
|
Loading…
Reference in New Issue