From ed3090d6d5f92a5710a15250f897a44fdf6387b7 Mon Sep 17 00:00:00 2001 From: Alex Young Date: Thu, 21 Jun 2012 10:29:06 +0100 Subject: [PATCH] Tweak struct initialisation to squash a valgrind error --- src/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.c b/src/client.c index dc0bb16..1b9ba7a 100644 --- a/src/client.c +++ b/src/client.c @@ -214,8 +214,8 @@ int client_write_reply( struct client * client, struct nbd_request *request, int void client_write_init( struct client * client, uint64_t size ) { - struct nbd_init init; - struct nbd_init_raw init_raw; + struct nbd_init init = {{0}}; + struct nbd_init_raw init_raw = {{0}}; memcpy( init.passwd, INIT_PASSWD, sizeof( INIT_PASSWD ) ); init.magic = INIT_MAGIC;