summaryrefslogtreecommitdiff
path: root/apps/talk.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/talk.c')
-rw-r--r--apps/talk.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/talk.c b/apps/talk.c
index 8507a89541..89319ae9a2 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -247,7 +247,6 @@ static struct buflib_callbacks talk_ops = {
247 247
248static int open_voicefile(void) 248static int open_voicefile(void)
249{ 249{
250 char buf[64];
251 char* p_lang = DEFAULT_VOICE_LANG; /* default */ 250 char* p_lang = DEFAULT_VOICE_LANG; /* default */
252 251
253 if ( global_settings.lang_file[0] && 252 if ( global_settings.lang_file[0] &&
@@ -256,9 +255,7 @@ static int open_voicefile(void)
256 p_lang = (char *)global_settings.lang_file; 255 p_lang = (char *)global_settings.lang_file;
257 } 256 }
258 257
259 snprintf(buf, sizeof(buf), LANG_DIR "/%s.voice", p_lang); 258 return open_pathfmt(O_RDONLY, LANG_DIR "/%s.voice", p_lang);
260
261 return open(buf, O_RDONLY);
262} 259}
263 260
264 261