diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-09-04 13:24:50 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-09-04 13:24:50 +0000 |
commit | 59c760dfcd9da4ce2a4e5b68e66416f77b4d5e5f (patch) | |
tree | e9d750d907a30ef7fe142f31199c84368c98b5a2 | |
parent | 6307d63715b7509b56384214d7a605e022c678bb (diff) | |
download | rtmux-59c760dfcd9da4ce2a4e5b68e66416f77b4d5e5f.tar.gz rtmux-59c760dfcd9da4ce2a4e5b68e66416f77b4d5e5f.tar.bz2 rtmux-59c760dfcd9da4ce2a4e5b68e66416f77b4d5e5f.zip |
Trivial code simplification from Tim Ruehsen.
-rw-r--r-- | paste.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -162,10 +162,8 @@ paste_print(struct paste_buffer *pb, size_t width) len = width; used = strvisx(buf, pb->data, len, VIS_OCTAL|VIS_TAB|VIS_NL); - if (pb->size > width || used > width) { - buf[width - 3] = '\0'; - strlcat(buf, "...", width); - } + if (pb->size > width || used > width) + strlcpy(buf + width - 3, "...", 4); return (buf); } |