summaryrefslogtreecommitdiffstats
path: root/server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-03 10:20:33 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-03 10:20:33 +0000
commita68b1e58db8b970f82cd17a74a18d30a0c77424e (patch)
treebcb83f59e3f453b381f9cc6c2ca1399e22176fd2 /server.c
parent9bb907f2a72721f7da4e67365d0ed6765f945006 (diff)
xcalloc, otherwise prefix may be !0.
Diffstat (limited to 'server.c')
-rw-r--r--server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.c b/server.c
index 77897ede..55765c93 100644
--- a/server.c
+++ b/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);