comparison gui/win32/dialogs.c @ 30702:9fc9d1e788aa

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.
author diego
date Fri, 26 Feb 2010 15:01:37 +0000
parents 9e739bdb049c
children 76a13038105e
comparison
equal deleted inserted replaced
30701:3c1f75f4affe 30702:9fc9d1e788aa
713 int len = SendMessage(listbox, LB_GETTEXTLEN, index, 0); 713 int len = SendMessage(listbox, LB_GETTEXTLEN, index, 0);
714 if (len) 714 if (len)
715 { 715 {
716 if (guiIntfStruct.Playing) guiGetEvent(guiCEvent, (void *) guiSetStop); 716 if (guiIntfStruct.Playing) guiGetEvent(guiCEvent, (void *) guiSetStop);
717 if (skinName) free(skinName); 717 if (skinName) free(skinName);
718 skinName = (char *) malloc(len+1); 718 skinName = malloc(len + 1);
719 SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName); 719 SendMessage(listbox, LB_GETTEXT, (WPARAM) index, (LPARAM) skinName);
720 /* fill out the full pathname to the skin */ 720 /* fill out the full pathname to the skin */
721 strcpy(skinspath, get_path("skins")); 721 strcpy(skinspath, get_path("skins"));
722 strcat(skinspath, "\\"); 722 strcat(skinspath, "\\");
723 strcat(skinspath, skinName); 723 strcat(skinspath, skinName);