mctp-demux-daemon: Fix erroneous call to memset()
Detected with CFLAGS="-Wall -Werror":
utils/mctp-demux-daemon.c: In function ‘socket_process’:
utils/mctp-demux-daemon.c:294:26: error: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
294 | memset(client, 0, sizeof(client));
| ^
cc1: all warnings being treated as errors
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ifc78c83858804c2145f93b0df3924404a3a6a51a
diff --git a/utils/mctp-demux-daemon.c b/utils/mctp-demux-daemon.c
index eb7121b..e30a607 100644
--- a/utils/mctp-demux-daemon.c
+++ b/utils/mctp-demux-daemon.c
@@ -291,7 +291,7 @@
ctx->n_clients * sizeof(struct client));
client = &ctx->clients[ctx->n_clients-1];
- memset(client, 0, sizeof(client));
+ memset(client, 0, sizeof(*client));
client->active = true;
client->sock = fd;