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:
Samuel Thibault 2022-08-15 23:48:26 +02:00 committed by Alexandr Epaneshnikov
commit 98dc103749

View file

@ -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;
}