summaryrefslogtreecommitdiff
path: root/src/twm.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-18 10:28:21 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-18 10:28:21 -0700
commitc2e232e6915356eba3edf2efea99720746694c52 (patch)
tree405691284d85ae87a5261b43c950d26af102d17a /src/twm.c
parent58f3c3b8d518786764f45ac2be1f1f0850129125 (diff)
Stop casting return values from malloc & calloc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
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;