aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winprefsyacc.y
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-04 12:18:13 +0100
committermarha <marha@users.sourceforge.net>2014-03-04 12:23:48 +0100
commit45392e4a0642880b569ea5d4a350cdc395a2c7db (patch)
treec3c2a49de903a18c3f8e1bf79684c29337ebcf7c /xorg-server/hw/xwin/winprefsyacc.y
parent5ec0616d4e3c4c6095f4975abbe9c21e5b6af967 (diff)
parent321c01267ae1c446f1bd22b642567fcafa016c02 (diff)
downloadvcxsrv-45392e4a0642880b569ea5d4a350cdc395a2c7db.tar.gz
vcxsrv-45392e4a0642880b569ea5d4a350cdc395a2c7db.tar.bz2
vcxsrv-45392e4a0642880b569ea5d4a350cdc395a2c7db.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libX11 libxcb mesa xserver xcb-proto xkeyboard-config git update 4 Mar 2014 Conflicts: mesalib/src/mapi/glapi/glapi.h mesalib/src/mapi/glapi/glthread.c mesalib/src/mesa/drivers/dri/common/dri_util.c mesalib/src/mesa/main/bufferobj.c xorg-server/dix/dispatch.c xorg-server/hw/xwin/glx/gen_gl_wrappers.py xorg-server/hw/xwin/winmultiwindowwm.c
Diffstat (limited to 'xorg-server/hw/xwin/winprefsyacc.y')
-rw-r--r--xorg-server/hw/xwin/winprefsyacc.y25
1 files changed, 10 insertions, 15 deletions
diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y
index ff051f233..73fb5d56e 100644
--- a/xorg-server/hw/xwin/winprefsyacc.y
+++ b/xorg-server/hw/xwin/winprefsyacc.y
@@ -315,10 +315,9 @@ static void
AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param)
{
if (menu.menuItem==NULL)
- menu.menuItem = (MENUITEM*)malloc(sizeof(MENUITEM));
+ menu.menuItem = malloc(sizeof(MENUITEM));
else
- menu.menuItem = (MENUITEM*)
- realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
+ menu.menuItem = realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
@@ -343,10 +342,9 @@ CloseMenu (void)
}
if (pref.menuItems)
- pref.menu = (MENUPARSED*)
- realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
+ pref.menu = realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
else
- pref.menu = (MENUPARSED*)malloc (sizeof(MENUPARSED));
+ pref.menu = malloc (sizeof(MENUPARSED));
memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
pref.menuItems++;
@@ -369,10 +367,9 @@ static void
AddIconLine (char *matchstr, char *iconfile)
{
if (pref.icon==NULL)
- pref.icon = (ICONITEM*)malloc(sizeof(ICONITEM));
+ pref.icon = malloc(sizeof(ICONITEM));
else
- pref.icon = (ICONITEM*)
- realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
+ pref.icon = realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
pref.icon[pref.iconItems].match[MENU_MAX] = 0;
@@ -405,10 +402,9 @@ static void
AddStyleLine (char *matchstr, unsigned long style)
{
if (pref.style==NULL)
- pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM));
+ pref.style = malloc(sizeof(STYLEITEM));
else
- pref.style = (STYLEITEM*)
- realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
+ pref.style = realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
pref.style[pref.styleItems].match[MENU_MAX] = 0;
@@ -438,10 +434,9 @@ static void
AddSysMenuLine (char *matchstr, char *menuname, int pos)
{
if (pref.sysMenu==NULL)
- pref.sysMenu = (SYSMENUITEM*)malloc(sizeof(SYSMENUITEM));
+ pref.sysMenu = malloc(sizeof(SYSMENUITEM));
else
- pref.sysMenu = (SYSMENUITEM*)
- realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
+ pref.sysMenu = realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;