diff options
author | Matija Skala <mskala@gmx.com> | 2017-04-27 02:08:52 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-04-26 20:08:52 -0400 |
commit | 77018a8c267c08ee8f70f51963e7fcc3bca70ba8 (patch) | |
tree | 112974ca73151e874c7f73e0f51b1ee76e2fee7f /src/shared | |
parent | 5a1d67639d8d3c25f817cf2958348c3f3193a573 (diff) |
improve readability (#5814)
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/pager.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/shared/pager.c b/src/shared/pager.c index 22d7603ec6..4d7b02c63c 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c @@ -176,12 +176,14 @@ void pager_close(void) { /* Inform pager that we are done */ (void) fflush(stdout); - if (stdout_redirected && ((stored_stdout < 0) || (dup2(stored_stdout, STDOUT_FILENO) < 0))) - (void) close(STDOUT_FILENO); + if (stdout_redirected) + if (stored_stdout < 0 || dup2(stored_stdout, STDOUT_FILENO) < 0) + (void) close(STDOUT_FILENO); stored_stdout = safe_close(stored_stdout); (void) fflush(stderr); - if (stderr_redirected && ((stored_stderr < 0) || (dup2(stored_stderr, STDERR_FILENO) < 0))) - (void) close(STDERR_FILENO); + if (stderr_redirected) + if (stored_stderr < 0 || dup2(stored_stderr, STDERR_FILENO) < 0) + (void) close(STDERR_FILENO); stored_stderr = safe_close(stored_stderr); stdout_redirected = stderr_redirected = false; |