Trivial code simplification from Tim Ruehsen.

pull/1/head
Nicholas Marriott 2012-09-04 13:24:50 +00:00
parent 6307d63715
commit 59c760dfcd
1 changed files with 2 additions and 4 deletions

View File

@ -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);
}