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
12
src/espeak.c
12
src/espeak.c
|
|
@ -377,12 +377,18 @@ static void queue_process_entry(struct synth_t *s)
|
||||||
break;
|
break;
|
||||||
case CMD_PAUSE:
|
case CMD_PAUSE:
|
||||||
if (!paused_espeak) {
|
if (!paused_espeak) {
|
||||||
espeak_Cancel();
|
error = espeak_Cancel();
|
||||||
espeak_Terminate();
|
if (error == EE_OK)
|
||||||
paused_espeak = 1;
|
error = espeak_Terminate();
|
||||||
|
if (error == EE_OK)
|
||||||
|
paused_espeak = 1;
|
||||||
|
} else {
|
||||||
|
error = EE_OK;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
/* Uh? */
|
||||||
|
error = EE_OK;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue