summaryrefslogtreecommitdiff
path: root/do_segs.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-15 13:10:52 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-15 13:10:52 -0700
commitc420f450d0a2b1f26d4043334bb8b6524fea4b07 (patch)
treec78fad4226f66e4003a2991a26d31cf11298a196 /do_segs.c
parent2900d7a7e7929414268cb142bf00c57d370e1396 (diff)
Stop casting return value of malloc() and calloc()
Not needed in C89 and later, and may hide errors Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'do_segs.c')
-rw-r--r--do_segs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/do_segs.c b/do_segs.c
index 369f784..db1cd46 100644
--- a/do_segs.c
+++ b/do_segs.c
@@ -50,7 +50,7 @@ GenerateSegments(XParms xp, Parms p, Bool ddashed)
size8 = 8 * size;
half = (size + 19) / 20;
- segments = (XSegment *)malloc((p->objects) * sizeof(XSegment));
+ segments = malloc((p->objects) * sizeof(XSegment));
/* All this x, x1, etc. stuff is to create a pattern that
(1) scans down the screen vertically, with each new segment going
@@ -225,7 +225,7 @@ InitHorizSegments(XParms xp, Parms p, int64_t reps)
size = p->special;
half = (size + 19) / 20;
- segments = (XSegment *)malloc((p->objects) * sizeof(XSegment));
+ segments = malloc((p->objects) * sizeof(XSegment));
x = half;
y = half;
@@ -298,7 +298,7 @@ InitVertSegments(XParms xp, Parms p, int64_t reps)
size = p->special;
half = (size + 19) / 20;
- segments = (XSegment *)malloc((p->objects) * sizeof(XSegment));
+ segments = malloc((p->objects) * sizeof(XSegment));
x = half;
y = half;