~ctwm/ctwm/trunk

« back to all changes in this revision

Viewing changes to util.c

  • Committer: Matthew Fuller
  • Date: 2016-05-28 06:24:19 UTC
  • mto: This revision was merged to the branch mainline in revision 492.
  • Revision ID: fullermd@over-yonder.net-20160528062419-haucmys30w8g471d
Stop casting return values of [mc]alloc().  void * has existed for 27
years now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
314
314
                len += HomeLen - 1;
315
315
        }
316
316
        len += strlen(p);
317
 
        ret = (char *) malloc(len + 1);
 
317
        ret = malloc(len + 1);
318
318
        *ret = 0;
319
319
 
320
320
        p   = path;
881
881
        if(col != NULL) {
882
882
                return (col->pix);
883
883
        }
884
 
        col = (struct Colori *) malloc(sizeof(struct Colori));
 
884
        col = malloc(sizeof(struct Colori));
885
885
        col->color = cp.back;
886
886
        col->pix   = XCreatePixmap(dpy, Scr->Root, h, h, Scr->d_depth);
887
887
        col->next = colori;
911
911
        if(col != NULL) {
912
912
                return (col->pix);
913
913
        }
914
 
        col = (struct Colori *) malloc(sizeof(struct Colori));
 
914
        col = malloc(sizeof(struct Colori));
915
915
        col->color = cp.back;
916
916
        col->pix   = XCreatePixmap(dpy, Scr->Root, w, h, Scr->d_depth);
917
917
        Draw3DBorder(col->pix, 0, 0, w, h, 4, cp, off, True, False);