mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Trivial code simplification from Tim Ruehsen.
This commit is contained in:
parent
6307d63715
commit
59c760dfcd
6
paste.c
6
paste.c
@ -162,10 +162,8 @@ paste_print(struct paste_buffer *pb, size_t width)
|
|||||||
len = width;
|
len = width;
|
||||||
|
|
||||||
used = strvisx(buf, pb->data, len, VIS_OCTAL|VIS_TAB|VIS_NL);
|
used = strvisx(buf, pb->data, len, VIS_OCTAL|VIS_TAB|VIS_NL);
|
||||||
if (pb->size > width || used > width) {
|
if (pb->size > width || used > width)
|
||||||
buf[width - 3] = '\0';
|
strlcpy(buf + width - 3, "...", 4);
|
||||||
strlcat(buf, "...", width);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (buf);
|
return (buf);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user