speller: when something goes wrong with 'sort', do not blame 'spell'

That is, check the exit status of 'sort' before the one of 'spell'.
master
Benno Schulenberg 2019-06-05 15:04:18 +02:00
parent 260588af1e
commit f92606491c
1 changed files with 4 additions and 4 deletions

View File

@ -2492,14 +2492,14 @@ const char *do_int_speller(const char *tempfile_name)
waitpid(pid_sort, &sort_status, 0); waitpid(pid_sort, &sort_status, 0);
waitpid(pid_uniq, &uniq_status, 0); waitpid(pid_uniq, &uniq_status, 0);
if (WIFEXITED(spell_status) == 0 || WEXITSTATUS(spell_status)) if (WIFEXITED(uniq_status) == 0 || WEXITSTATUS(uniq_status))
return _("Error invoking \"spell\""); return _("Error invoking \"uniq\"");
if (WIFEXITED(sort_status) == 0 || WEXITSTATUS(sort_status)) if (WIFEXITED(sort_status) == 0 || WEXITSTATUS(sort_status))
return _("Error invoking \"sort -f\""); return _("Error invoking \"sort -f\"");
if (WIFEXITED(uniq_status) == 0 || WEXITSTATUS(uniq_status)) if (WIFEXITED(spell_status) == 0 || WEXITSTATUS(spell_status))
return _("Error invoking \"uniq\""); return _("Error invoking \"spell\"");
/* When all went okay. */ /* When all went okay. */
return NULL; return NULL;