~ctwm/ctwm/trunk

« back to all changes in this revision

Viewing changes to menus.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:
185
185
        }
186
186
 
187
187
        if(tmp == NULL) {
188
 
                tmp = (FuncKey *) malloc(sizeof(FuncKey));
 
188
                tmp = malloc(sizeof(FuncKey));
189
189
                tmp->next = Scr->FuncKeyRoot.next;
190
190
                Scr->FuncKeyRoot.next = tmp;
191
191
        }
688
688
 
689
689
#define UNUSED_PIXEL ((unsigned long) (~0))     /* more than 24 bits */
690
690
 
691
 
        tmp = (MenuRoot *) malloc(sizeof(MenuRoot));
 
691
        tmp = malloc(sizeof(MenuRoot));
692
692
        tmp->highlight.fore = UNUSED_PIXEL;
693
693
        tmp->highlight.back = UNUSED_PIXEL;
694
694
        tmp->name = name;
791
791
                item, action, sub, func);
792
792
#endif
793
793
 
794
 
        tmp = (MenuItem *) malloc(sizeof(MenuItem));
 
794
        tmp = malloc(sizeof(MenuItem));
795
795
        tmp->root = menu;
796
796
 
797
797
        if(menu->first == NULL) {
1265
1265
                        }
1266
1266
                        WindowNameCount++;
1267
1267
                }
1268
 
                WindowNames = (TwmWindow **)malloc(sizeof(TwmWindow *)*WindowNameCount);
 
1268
                WindowNames = malloc(sizeof(TwmWindow *)*WindowNameCount);
1269
1269
                WindowNameCount = 0;
1270
1270
                for(tmp_win = Scr->FirstWindow;
1271
1271
                                tmp_win != NULL;
2539
2539
        XChangeGC(dpy, gc, GCFunction, &gcv);
2540
2540
 
2541
2541
        nrects = ((width * height) / (srect * srect)) / 10;
2542
 
        rectangles = (XRectangle *) malloc(nrects * sizeof(XRectangle));
 
2542
        rectangles = malloc(nrects * sizeof(XRectangle));
2543
2543
        for(j = 0; j < nrects; j++) {
2544
2544
                rectangles [j].width  = srect;
2545
2545
                rectangles [j].height = srect;