]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/rgw_main.cc: fix parenteses and function result
authorWillem Jan Withagen <wjw@digiware.nl>
Sat, 3 Dec 2016 19:07:30 +0000 (20:07 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Sat, 3 Dec 2016 19:07:30 +0000 (20:07 +0100)
 - 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 <wjw@digiware.nl>
src/rgw/rgw_main.cc

index 09e650e1dbd65420bb687ead4631d9e1c99e1b44..a4a141f353503b505ddc7bf79f64c3451f932404 100644 (file)
@@ -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;