mirror of
https://github.com/tmux/tmux.git
synced 2025-09-05 16:27:03 +00:00
Merge branch 'obsd-master'
Conflicts: Makefile cmd-list-commands.c cmd-suspend-client.c job.c tmux.h xmalloc.c
This commit is contained in:
10
screen.c
10
screen.c
@ -32,12 +32,12 @@ void screen_resize_y(struct screen *, u_int);
|
||||
void
|
||||
screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
|
||||
{
|
||||
char hn[MAXHOSTNAMELEN];
|
||||
char host[HOST_NAME_MAX];
|
||||
|
||||
s->grid = grid_create(sx, sy, hlimit);
|
||||
|
||||
if (gethostname(hn, MAXHOSTNAMELEN) == 0)
|
||||
s->title = xstrdup(hn);
|
||||
if (gethostname(host, HOST_NAME_MAX) == 0)
|
||||
s->title = xstrdup(host);
|
||||
else
|
||||
s->title = xstrdup("");
|
||||
|
||||
@ -216,8 +216,8 @@ screen_resize_y(struct screen *s, u_int sy)
|
||||
}
|
||||
|
||||
/* Resize line arrays. */
|
||||
gd->linedata = xrealloc(
|
||||
gd->linedata, gd->hsize + sy, sizeof *gd->linedata);
|
||||
gd->linedata = xreallocarray(gd->linedata, gd->hsize + sy,
|
||||
sizeof *gd->linedata);
|
||||
|
||||
/* Size increasing. */
|
||||
if (sy > oldy) {
|
||||
|
Reference in New Issue
Block a user