summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-26 15:01:37 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-26 15:01:37 +0000
commitb63759b175cf9ddd9735ca0d2f803fe62f69c3c3 (patch)
treea583febda46545afc4ed20ccbdbed0ae3165a5c4 /gui
parentfad137d7fe3bfef6a258518a1e86a4d811d3b4b5 (diff)
downloadmpv-b63759b175cf9ddd9735ca0d2f803fe62f69c3c3.tar.bz2
mpv-b63759b175cf9ddd9735ca0d2f803fe62f69c3c3.tar.xz
Do not cast the results of malloc/calloc/realloc.
These functions return void*, which is compatible with any pointer, so there is no need for casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'gui')
-rw-r--r--gui/win32/dialogs.c2
-rw-r--r--gui/win32/widgetrender.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gui/win32/dialogs.c b/gui/win32/dialogs.c
index 60a8d8c759..edd63d570c 100644
--- a/gui/win32/dialogs.c
+++ b/gui/win32/dialogs.c
@@ -715,7 +715,7 @@ static LRESULT CALLBACK SkinBrowserWndProc(HWND hwnd, UINT iMsg, WPARAM wParam,
{
if (guiIntfStruct.Playing) guiGetEvent(guiCEvent, (void *) guiSetStop);
if (skinName) free(skinName);
- skinName = (char *) malloc(len+1);
+ skinName = malloc(len + 1);
SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName);
/* fill out the full pathname to the skin */
strcpy(skinspath, get_path("skins"));
diff --git a/gui/win32/widgetrender.c b/gui/win32/widgetrender.c
index 0ac2e730ea..4dcd105b8b 100644
--- a/gui/win32/widgetrender.c
+++ b/gui/win32/widgetrender.c
@@ -185,7 +185,7 @@ static char *generatetextfromlabel(widget *item)
/* cuts text to buflen scrolling from right to left */
static void scrolltext(char *text, unsigned int buflen, float *value)
{
- char *buffer = (char *) malloc(buflen + 1);
+ char *buffer = malloc(buflen + 1);
unsigned int x,i;
if(*value < buflen) x = 0;
else x = *value - buflen;