[asterisk-bugs] [LibPRI 0011469]: [patch] Use calloc() instead of malloc() + memset()
noreply at bugs.digium.com
noreply at bugs.digium.com
Thu Dec 6 16:13:44 CST 2007
The following issue has been ASSIGNED.
======================================================================
http://bugs.digium.com/view.php?id=11469
======================================================================
Reported By: eliel
Assigned To: russell
======================================================================
Project: LibPRI
Issue ID: 11469
Category: General
Reproducibility: always
Severity: trivial
Priority: normal
Status: assigned
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 487
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 12-04-2007 22:10 CST
Last Modified: 12-06-2007 16:13 CST
======================================================================
Summary: [patch] Use calloc() instead of malloc() + memset()
Description:
Alloc the memory allready set to zero. And use the "pointer" way for the
sizeof() of a alloc.
example:
malloc(sizeof(*p)) instead of malloc(sizeof(struct stname))
======================================================================
----------------------------------------------------------------------
svnbot - 12-06-07 16:13
----------------------------------------------------------------------
Repository: libpri
Revision: 496
U trunk/pri.c
U trunk/pri_facility.c
U trunk/q921.c
U trunk/q931.c
------------------------------------------------------------------------
r496 | russell | 2007-12-06 16:13:43 -0600 (Thu, 06 Dec 2007) | 10 lines
Change malloc+memset to calloc. Also, handle allocation failures early to
reduce indentation.
(closes issue http://bugs.digium.com/view.php?id=11469)
Reported by: eliel
Patches:
pri.c.patch uploaded by eliel (license 64)
q931.c.patch uploaded by eliel (license 64)
q921.c.patch uploaded by eliel (license 64)
pri_facility.c.patch uploaded by eliel (license 64)
------------------------------------------------------------------------
http://svn.digium.com/view/libpri?view=rev&revision=496
Issue History
Date Modified Username Field Change
======================================================================
12-06-07 16:13 svnbot Note Added: 0074969
12-06-07 16:13 svnbot Assigned To mattf => russell
======================================================================
More information about the asterisk-bugs
mailing list