diff options
author | Amadeusz Sławiński <amade@asmblr.net> | 2012-01-18 00:02:37 +0100 |
---|---|---|
committer | Amadeusz Sławiński <amade@asmblr.net> | 2015-06-25 15:54:32 +0200 |
commit | 0dbcbb616bebb940b2dd1d3b3bb3502325f612df (patch) | |
tree | 7f9c9c6250f8d1b79b2d4a326b97fd5132db46da /src/canvas.c | |
parent | e888ee0799ed2a93b1e78fad4f768ffd9bf4c161 (diff) | |
download | screen-0dbcbb616bebb940b2dd1d3b3bb3502325f612df.tar.gz |
xrealloc returns void* and remove all *allocs casts
Diffstat (limited to 'src/canvas.c')
-rw-r--r-- | src/canvas.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/canvas.c b/src/canvas.c index 5a44380..c04720a 100644 --- a/src/canvas.c +++ b/src/canvas.c @@ -352,7 +352,7 @@ MakeDefaultCanvas() struct canvas *cv; ASSERT(display); - if ((cv = (struct canvas *)calloc(1, sizeof *cv)) == 0) + if ((cv = calloc(1, sizeof *cv)) == 0) return -1; cv->c_xs = 0; cv->c_xe = D_width - 1; @@ -623,7 +623,7 @@ AddPerp(struct canvas *cv) struct canvas *pcv; debug("Creating new perp node\n"); - if ((pcv = (struct canvas *)calloc(1, sizeof *cv)) == 0) + if ((pcv = calloc(1, sizeof *cv)) == 0) return 0; pcv->c_next = 0; pcv->c_display = cv->c_display; @@ -690,7 +690,7 @@ AddCanvas(int orient) if (h < 0) return -1; /* can't fit in */ - if ((cv = (struct canvas *)calloc(1, sizeof *cv)) == 0) + if ((cv = calloc(1, sizeof *cv)) == 0) return -1; D_forecv->c_slback->c_ye = ye; /* in case we modified it above */ @@ -848,14 +848,14 @@ DupLayoutCv(struct canvas *cvf, struct canvas *cvt, int save) } if (cvf->c_slperp) { - cvt->c_slperp = (struct canvas *)calloc(1, sizeof(struct canvas)); + cvt->c_slperp = calloc(1, sizeof(struct canvas)); cvt->c_slperp->c_slback = cvt; CanvasInitBlank(cvt->c_slperp); DupLayoutCv(cvf->c_slperp, cvt->c_slperp, save); } if (cvf->c_slnext) { - cvt->c_slnext = (struct canvas *)calloc(1, sizeof(struct canvas)); + cvt->c_slnext = calloc(1, sizeof(struct canvas)); cvt->c_slnext->c_slprev = cvt; cvt->c_slnext->c_slback = cvt->c_slback; CanvasInitBlank(cvt->c_slnext); |