From 6776fab00d7dac7a816fdc0f453cf10b727e79c9 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Sat, 3 Dec 2016 20:07:30 +0100 Subject: [PATCH] rgw/rgw_main.cc: fix parenteses and function result - The function in the macro parameter is expected to return -1 i on error and not type(bool). So reorganize the parenteses and just pass dup2() to the macro. Signed-off-by: Willem Jan Withagen --- src/rgw/rgw_main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 09e650e1dbd..a4a141f3535 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -196,7 +196,7 @@ int main(int argc, const char **argv) // dout() messages will be sent to stderr, but FCGX wants messages on stdout // Redirect stderr to stdout. TEMP_FAILURE_RETRY(close(STDERR_FILENO)); - if (TEMP_FAILURE_RETRY(dup2(STDOUT_FILENO, STDERR_FILENO) < 0)) { + if (TEMP_FAILURE_RETRY(dup2(STDOUT_FILENO, STDERR_FILENO)) < 0) { int err = errno; cout << "failed to redirect stderr to stdout: " << cpp_strerror(err) << std::endl; -- 2.39.5