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 <thomas.jarosch@intra2net.com>
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
This commit is contained in:
Thomas Jarosch 2012-03-30 11:14:59 +02:00 committed by Karsten Keil
parent 49271ab9d1
commit d129f9a272
1 changed files with 1 additions and 1 deletions

View File

@ -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;