diff options
author | Matthieu Herrb <matthieu.herrb@laas.fr> | 2013-11-02 15:32:40 +0100 |
---|---|---|
committer | Matthieu Herrb <matthieu.herrb@laas.fr> | 2013-11-02 15:32:40 +0100 |
commit | 8c2c913fee87d96eebaf7fc88a325c2dd27074a8 (patch) | |
tree | 3150ade56abc2e91747b6c2e34368491e6560dd3 /src/menus.c | |
parent | fdf60fe3c0169fa168321deb1a2ccd188ee384f8 (diff) | |
parent | 9c09c3e3577460fcef44e7abe51d22fcbda10ea8 (diff) |
Merge remote-tracking branch 'origin/master' into obsd
Conflicts:
src/session.c
src/util.c
Diffstat (limited to 'src/menus.c')
-rw-r--r-- | src/menus.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/menus.c b/src/menus.c index 2ca67bf..73d1578 100644 --- a/src/menus.c +++ b/src/menus.c @@ -157,7 +157,7 @@ InitMenus(void) free(key->name); tmp = key; key = key->next; - free((char *) tmp); + free(tmp); } Scr->FuncKeyRoot.next = NULL; } @@ -204,7 +204,7 @@ Bool AddFuncKey (char *name, int cont, int mods, int func, char *win_name, if (tmp == NULL) { - tmp = (FuncKey *) malloc(sizeof(FuncKey)); + tmp = malloc(sizeof(FuncKey)); tmp->next = Scr->FuncKeyRoot.next; Scr->FuncKeyRoot.next = tmp; } @@ -226,7 +226,7 @@ Bool AddFuncKey (char *name, int cont, int mods, int func, char *win_name, int CreateTitleButton (const char *name, int func, const char *action, MenuRoot *menuroot, Bool rightside, Bool append) { - TitleButton *tb = (TitleButton *) malloc (sizeof(TitleButton)); + TitleButton *tb = malloc (sizeof(TitleButton)); if (!tb) { fprintf (stderr, @@ -633,7 +633,7 @@ NewMenuRoot(const char *name) #define UNUSED_PIXEL ((unsigned long) (~0)) /* more than 24 bits */ - tmp = (MenuRoot *) malloc(sizeof(MenuRoot)); + tmp = malloc(sizeof(MenuRoot)); tmp->hi_fore = UNUSED_PIXEL; tmp->hi_back = UNUSED_PIXEL; tmp->name = name; @@ -697,7 +697,7 @@ AddToMenu(MenuRoot *menu, const char *item, const char *action, item, action, sub, func); #endif - tmp = (MenuItem *) malloc(sizeof(MenuItem)); + tmp = malloc(sizeof(MenuItem)); tmp->root = menu; if (menu->first == NULL) @@ -999,8 +999,7 @@ PopUpMenu (MenuRoot *menu, int x, int y, Bool center) WindowNameCount++; if (WindowNameCount != 0) { - WindowNames = - (TwmWindow **)malloc(sizeof(TwmWindow *)*WindowNameCount); + WindowNames = malloc(sizeof(TwmWindow *) * WindowNameCount); WindowNames[0] = Scr->TwmRoot.next; for(tmp_win = Scr->TwmRoot.next->next , WindowNameCount=1; tmp_win != NULL; @@ -2762,8 +2761,7 @@ BumpWindowColormap (TwmWindow *tmp, int inc) if (!tmp) return; if (inc && tmp->cmaps.number_cwins > 0) { - cwins = (ColormapWindow **) malloc(sizeof(ColormapWindow *)* - tmp->cmaps.number_cwins); + cwins = malloc(sizeof(ColormapWindow *) * tmp->cmaps.number_cwins); if (cwins) { if ((previously_installed = /* SUPPRESS 560 */(Scr->cmapInfo.cmaps == &tmp->cmaps && @@ -2781,7 +2779,7 @@ BumpWindowColormap (TwmWindow *tmp, int inc) cwins[j] = tmp->cmaps.cwins[i]; } - free((char *) tmp->cmaps.cwins); + free(tmp->cmaps.cwins); tmp->cmaps.cwins = cwins; @@ -2842,7 +2840,7 @@ DestroyMenu (MenuRoot *menu) for (item = menu->first; item; ) { MenuItem *tmp = item; item = item->next; - free ((char *) tmp); + free (tmp); } } |