mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
xcalloc, otherwise prefix may be !0.
This commit is contained in:
parent
9bb907f2a7
commit
a68b1e58db
4
server.c
4
server.c
@ -1,4 +1,4 @@
|
||||
/* $Id: server.c,v 1.17 2007-10-03 10:18:32 nicm Exp $ */
|
||||
/* $Id: server.c,v 1.18 2007-10-03 10:20:33 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -272,7 +272,7 @@ server_accept_client(int srv_fd)
|
||||
if (fcntl(client_fd, F_SETFL, mode|O_NONBLOCK) == -1)
|
||||
fatal("fcntl failed");
|
||||
|
||||
c = xmalloc(sizeof *c);
|
||||
c = xcalloc(1, sizeof *c);
|
||||
c->fd = client_fd;
|
||||
c->in = buffer_create(BUFSIZ);
|
||||
c->out = buffer_create(BUFSIZ);
|
||||
|
Loading…
Reference in New Issue
Block a user