mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-09 09:19:09 +02:00
queue_process_entry: Avoid leaving error uninitialized
CMD_PAUSE was not actually setting error to EE_OK, and the default case, even if it is not supposed to happen, should set error to something sane.
This commit is contained in:
parent
d7c06a6f9f
commit
98dc103749
1 changed files with 9 additions and 3 deletions
10
src/espeak.c
10
src/espeak.c
|
|
@ -377,12 +377,18 @@ static void queue_process_entry(struct synth_t *s)
|
|||
break;
|
||||
case CMD_PAUSE:
|
||||
if (!paused_espeak) {
|
||||
espeak_Cancel();
|
||||
espeak_Terminate();
|
||||
error = espeak_Cancel();
|
||||
if (error == EE_OK)
|
||||
error = espeak_Terminate();
|
||||
if (error == EE_OK)
|
||||
paused_espeak = 1;
|
||||
} else {
|
||||
error = EE_OK;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Uh? */
|
||||
error = EE_OK;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue