aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authornicm <nicm>2014-01-09 14:05:55 +0000
committernicm <nicm>2014-01-09 14:05:55 +0000
commitadc1f21eaee899b8ecfdb6ef3676d9a25019e4fa (patch)
tree54d9a476292b7b41200ffa4cc5216c1b1e5aa28b /screen.c
parent994cb872cfb5ef49a08a714d093d92bfee79b0e8 (diff)
downloadrtmux-adc1f21eaee899b8ecfdb6ef3676d9a25019e4fa.tar.gz
rtmux-adc1f21eaee899b8ecfdb6ef3676d9a25019e4fa.tar.bz2
rtmux-adc1f21eaee899b8ecfdb6ef3676d9a25019e4fa.zip
Three small changes from Tiago Cunha:
- Check for truncation when copying path. - Don't need to use a temporary buffer in screen_set_title. - Include strerror in output when connecting to server fails.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/screen.c b/screen.c
index 76aa91c6..2b0e9fba 100644
--- a/screen.c
+++ b/screen.c
@@ -110,12 +110,8 @@ screen_set_cursor_colour(struct screen *s, const char *colour_string)
void
screen_set_title(struct screen *s, const char *title)
{
- char tmp[BUFSIZ];
-
- strlcpy(tmp, title, sizeof tmp);
-
free(s->title);
- s->title = xstrdup(tmp);
+ s->title = xstrdup(title);
}
/* Resize screen. */