mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
terminal: 'child_ret' variables isn't needed
This commit is contained in:
parent
f28fb6c039
commit
563c910127
1 changed files with 3 additions and 5 deletions
|
|
@ -627,18 +627,16 @@ term_destroy(struct terminal *term)
|
|||
int status;
|
||||
waitpid(term->slave, &status, 0);
|
||||
|
||||
int child_ret = EXIT_FAILURE;
|
||||
ret = EXIT_FAILURE;
|
||||
if (WIFEXITED(status)) {
|
||||
child_ret = WEXITSTATUS(status);
|
||||
ret = WEXITSTATUS(status);
|
||||
LOG_DBG("slave exited with code %d", child_ret);
|
||||
} else if (WIFSIGNALED(status)) {
|
||||
child_ret = WTERMSIG(status);
|
||||
ret = WTERMSIG(status);
|
||||
LOG_WARN("slave exited with signal %d", child_ret);
|
||||
} else {
|
||||
LOG_WARN("slave exited for unknown reason (status = 0x%08x)", status);
|
||||
}
|
||||
|
||||
ret = child_ret;
|
||||
}
|
||||
|
||||
free(term);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue