From d129f9a2728a00f5b2c287984e7d0015ebe689f0 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Fri, 30 Mar 2012 11:14:59 +0200 Subject: [PATCH] Fix wrong argument to sizeof() call inside memset() --Boundary-01=_TmXdPquVkL/6TeR Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit We were passing the pointer size instead of the structure size. cppcheck reported: [bridge/bridge.c:547]: (warning) Using size of pointer mISDNport instead of size of its data. Signed-off-by: Thomas Jarosch Signed-off-by: Karsten Keil --- bridge/bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/bridge.c b/bridge/bridge.c index 7d92ea3..0306cd8 100644 --- a/bridge/bridge.c +++ b/bridge/bridge.c @@ -544,7 +544,7 @@ struct mISDNport *mISDN_port_open(int port, int nt_mode, int hdlc) fprintf(stderr, "Cannot alloc mISDNport structure\n"); return(NULL); } - memset(mISDNport, 0, sizeof(mISDNport)); + memset(mISDNport, 0, sizeof(struct mISDNport)); *mISDNportp = mISDNport; mISDNport->prev = mISDNport_prev;