Skip to content

Commit

Permalink
Remove usage of static variable, so timidity can be opened/closed sev…
Browse files Browse the repository at this point in the history
…eral times at will
  • Loading branch information
pmandin committed Nov 28, 2006
1 parent 263e9db commit 47cc0d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions timidity/common.c
Expand Up @@ -104,7 +104,6 @@ FILE *open_file(char *name, int decompress, int noise_mode)
FILE *fp;
PathList *plp;
int l;
static int firsttime=1;

if (!name || !(*name))
{
Expand All @@ -113,10 +112,9 @@ FILE *open_file(char *name, int decompress, int noise_mode)
}

#ifdef DEFAULT_PATH
if (firsttime && (pathlist==NULL)) {
if (pathlist==NULL) {
/* Generate path list */
add_to_pathlist(DEFAULT_PATH);
firsttime=0;
}
#endif

Expand Down Expand Up @@ -244,4 +242,5 @@ void free_pathlist(void)
free(plp);
plp = next_plp;
}
pathlist = NULL;
}

0 comments on commit 47cc0d1

Please sign in to comment.