From c420f450d0a2b1f26d4043334bb8b6524fea4b07 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 15 Oct 2022 13:10:52 -0700 Subject: Stop casting return value of malloc() and calloc() Not needed in C89 and later, and may hide errors Signed-off-by: Alan Coopersmith --- do_traps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'do_traps.c') diff --git a/do_traps.c b/do_traps.c index b1b3e2b..0fd7056 100644 --- a/do_traps.c +++ b/do_traps.c @@ -41,7 +41,7 @@ InitTrapezoids(XParms xp, Parms p, int64_t reps) size = p->special; numPoints = (p->objects) * NUM_POINTS; - points = (XPoint *)malloc(numPoints * sizeof(XPoint)); + points = malloc(numPoints * sizeof(XPoint)); curPoint = points; x = size; y = 0; @@ -136,7 +136,7 @@ InitFixedTraps(XParms xp, Parms p, int64_t reps) size = p->special; numTraps = p->objects; - traps = (XTrap *)malloc(numTraps * sizeof(XTrap)); + traps = malloc(numTraps * sizeof(XTrap)); curTrap = traps; x = size; y = 0; @@ -273,7 +273,7 @@ InitFixedTrapezoids(XParms xp, Parms p, int64_t reps) size = p->special; numTraps = p->objects; - trapezoids = (XTrapezoid *)malloc(numTraps * sizeof(XTrapezoid)); + trapezoids = malloc(numTraps * sizeof(XTrapezoid)); curTrap = trapezoids; x = size; y = 0; -- cgit v1.2.3