# HG changeset patch # User reimar # Date 1267471552 0 # Node ID e5c32d429e3a33f4fb0d9a9179d1995b2d0baae9 # Parent b41ac9f6e26f1a6246d2e9e6c8d42e4384e5f0c9 Avoid a global variable and a strcpy. diff -r b41ac9f6e26f -r e5c32d429e3a stream/stream_cue.c --- a/stream/stream_cue.c Mon Mar 01 19:21:59 2010 +0000 +++ b/stream/stream_cue.c Mon Mar 01 19:25:52 2010 +0000 @@ -75,8 +75,6 @@ static FILE* fd_cue; static int fd_bin = 0; -static char bin_filename[256]; - static char cue_filename[256]; static char bincue_path[256]; @@ -180,6 +178,7 @@ static int cue_find_bin (char *firstline) { const char *cur_name; int i,j; + char bin_filename[256]; char s[256]; char t[256]; @@ -267,11 +266,8 @@ return -1; } - if (cur_name != bin_filename) - strcpy(bin_filename, cur_name); - mp_msg(MSGT_OPEN,MSGL_INFO, - MSGTR_MPDEMUX_CUEREAD_UsingBinFile, bin_filename); + MSGTR_MPDEMUX_CUEREAD_UsingBinFile, cur_name); return 0; }