summaryrefslogtreecommitdiff
path: root/geometry.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-10 15:33:17 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-11 15:36:06 -0800
commit1fb639c97fc28b8ed66b5553eafbbeed07e4cb09 (patch)
tree9d8da033bf81897198e4ca47b5e5b6efe4a3a90f /geometry.c
parent8e58b7949ab96180d60fb13f7820d6cc01c228ae (diff)
Replace malloc()+bzero() pairs with calloc() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'geometry.c')
-rw-r--r--geometry.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/geometry.c b/geometry.c
index 82f302d..bce1723 100644
--- a/geometry.c
+++ b/geometry.c
@@ -699,10 +699,9 @@ NextProperty(GeometryInfo * info)
{
PropertyInfo *pi;
- pi = malloc(sizeof(PropertyInfo));
+ pi = calloc(1, sizeof(PropertyInfo));
if (pi)
{
- bzero(pi, sizeof(PropertyInfo));
info->props = (PropertyInfo *) AddCommonInfo(&info->props->defs,
(CommonInfo *) pi);
info->nProps++;
@@ -776,10 +775,9 @@ NextShape(GeometryInfo * info)
{
ShapeInfo *si;
- si = malloc(sizeof(ShapeInfo));
+ si = calloc(1, sizeof(ShapeInfo));
if (si)
{
- bzero(si, sizeof(ShapeInfo));
info->shapes = (ShapeInfo *) AddCommonInfo(&info->shapes->defs,
(CommonInfo *) si);
info->nShapes++;