tweaks: normalize the indentation, and regroup two lines

master
Benno Schulenberg 2020-07-31 20:34:50 +02:00
parent 3eff34b075
commit 0e1f7fe2ef
1 changed files with 8 additions and 11 deletions

View File

@ -2123,14 +2123,13 @@ const char *treat(char *tempfile_name, char *theprogram, bool spelling)
/* Terminate the child if the program is not found. */ /* Terminate the child if the program is not found. */
exit(9); exit(9);
} else if (thepid > 0) { } else if (thepid > 0) {
/* Block SIGWINCHes while waiting for the program to end, /* Block SIGWINCHes while waiting for the forked program to end,
* so nano doesn't get pushed past the wait(). */ * so nano doesn't get pushed past the wait(). */
block_sigwinch(TRUE); block_sigwinch(TRUE);
wait(&program_status); wait(&program_status);
block_sigwinch(FALSE); block_sigwinch(FALSE);
} } else
errornumber = errno;
errornumber = errno;
/* Restore the terminal state and reenter curses mode. */ /* Restore the terminal state and reenter curses mode. */
terminal_init(); terminal_init();
@ -2139,9 +2138,7 @@ const char *treat(char *tempfile_name, char *theprogram, bool spelling)
if (thepid < 0) { if (thepid < 0) {
statusline(ALERT, _("Could not fork: %s"), strerror(errornumber)); statusline(ALERT, _("Could not fork: %s"), strerror(errornumber));
return NULL; return NULL;
} } else if (!WIFEXITED(program_status) || WEXITSTATUS(program_status) > 2) {
if (!WIFEXITED(program_status) || WEXITSTATUS(program_status) > 2) {
statusline(ALERT, _("Error invoking '%s'"), arguments[0]); statusline(ALERT, _("Error invoking '%s'"), arguments[0]);
return NULL; return NULL;
} else if (WEXITSTATUS(program_status) != 0) } else if (WEXITSTATUS(program_status) != 0)