From 7b154dc4313324dfad6cf0117b8ce246bf12bf16 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 5 Sep 1998 13:24:20 +0000 Subject: some cleanups to use ZERO_STRUCT() and friends --- source/smbd/conn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/smbd/conn.c') diff --git a/source/smbd/conn.c b/source/smbd/conn.c index 2afbfb7d7eb..5dc904bd91b 100644 --- a/source/smbd/conn.c +++ b/source/smbd/conn.c @@ -108,7 +108,7 @@ connection_struct *conn_new(void) conn = (connection_struct *)malloc(sizeof(*conn)); if (!conn) return NULL; - memset(conn, 0, sizeof(*conn)); + ZERO_STRUCTP(conn); conn->cnum = i; bitmap_set(bmap, i); @@ -184,6 +184,6 @@ void conn_free(connection_struct *conn) bitmap_clear(bmap, conn->cnum); num_open--; - memset(conn, 0, sizeof(*conn)); + ZERO_STRUCTP(conn); free(conn); } -- cgit