# HG changeset patch # User pontscho # Date 1042849338 0 # Node ID 5c7d926000185aaacf6feabda1faff530289740e # Parent e005b55c3a0a477ccb23ac884a563289969822f1 10l found by Arpi (njamd) diff -r e005b55c3a0a -r 5c7d92600018 Gui/mplayer/gtk/sb.c --- a/Gui/mplayer/gtk/sb.c Fri Jan 17 23:50:53 2003 +0000 +++ b/Gui/mplayer/gtk/sb.c Sat Jan 18 00:22:18 2003 +0000 @@ -50,15 +50,10 @@ gtkOldSkin=strdup( skinName ); prev=gtkOldSkin; - if ( ( str[0]=(char *)calloc( 1,7 ) ) == NULL ) - { - gtkMessageBox( GTK_MB_FATAL,MSGTR_SKINBROWSER_NotEnoughMemory ); - return 0; - } + + str[0]="default"; str[1]=""; - strcpy( str[0],"default" ); if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str ); - free( str[0] ); glob( mdir,GLOB_NOSORT,NULL,&gg ); for( i=0;i<(int)gg.gl_pathc;i++ ) @@ -69,10 +64,8 @@ { tmp=strrchr( gg.gl_pathv[i],'/' ); tmp++; if ( !strcmp( tmp,"default" ) ) continue; - if ( ( str[0]=(char *)malloc( strlen( tmp ) + 1 ) ) == NULL ) { gtkMessageBox( GTK_MB_FATAL,MSGTR_SKINBROWSER_NotEnoughMemory ); return 0; } - strcpy( str[0],tmp ); + str[0]=tmp; if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str ); - free( str[0] ); } } globfree( &gg );