summaryrefslogtreecommitdiff
path: root/src/twm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/twm.c')
-rw-r--r--src/twm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/twm.c b/src/twm.c
index 31b6b62..1a6ae95 100644
--- a/src/twm.c
+++ b/src/twm.c
@@ -375,7 +375,7 @@ main(int argc, char *argv[])
InfoLines = 0;
/* for simplicity, always allocate NumScreens ScreenInfo struct pointers */
- ScreenList = (ScreenInfo **) calloc (NumScreens, sizeof (ScreenInfo *));
+ ScreenList = calloc (NumScreens, sizeof (ScreenInfo *));
if (ScreenList == NULL)
{
fprintf (stderr, "%s: Unable to allocate memory for screen list, exiting.\n",
@@ -424,8 +424,7 @@ main(int argc, char *argv[])
numManaged ++;
/* Note: ScreenInfo struct is calloc'ed to initialize to zero. */
- Scr = ScreenList[scrnum] =
- (ScreenInfo *) calloc(1, sizeof(ScreenInfo));
+ Scr = ScreenList[scrnum] = calloc(1, sizeof(ScreenInfo));
if (Scr == NULL)
{
fprintf (stderr, "%s: unable to allocate memory for ScreenInfo structure for screen %d.\n",
@@ -473,8 +472,7 @@ main(int argc, char *argv[])
XSaveContext (dpy, Scr->Root, ScreenContext, (caddr_t) Scr);
Scr->TwmRoot.cmaps.number_cwins = 1;
- Scr->TwmRoot.cmaps.cwins =
- (ColormapWindow **) malloc(sizeof(ColormapWindow *));
+ Scr->TwmRoot.cmaps.cwins = malloc(sizeof(ColormapWindow *));
Scr->TwmRoot.cmaps.cwins[0] =
CreateColormapWindow(Scr->Root, True, False);
Scr->TwmRoot.cmaps.cwins[0]->visibility = VisibilityPartiallyObscured;