NO-JIRA: Fix clang compile error: umask(0) < 0

umask() returns the previous mask bits, an unsigned value, not an error code.
The < 0 test is always false


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/d6e66732
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/d6e66732
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/d6e66732

Branch: refs/heads/master
Commit: d6e66732c6b924d53d2bf4d1cc9df46c30df53f1
Parents: 05dd0dd
Author: Alan Conway <[email protected]>
Authored: Mon Nov 21 20:18:08 2016 -0500
Committer: Alan Conway <[email protected]>
Committed: Fri Nov 25 11:57:40 2016 -0500

----------------------------------------------------------------------
 router/src/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/d6e66732/router/src/main.c
----------------------------------------------------------------------
diff --git a/router/src/main.c b/router/src/main.c
index b8fc04b..496c616 100644
--- a/router/src/main.c
+++ b/router/src/main.c
@@ -209,7 +209,7 @@ static void daemon_process(const char *config_path, const 
char *python_pkgdir,
             //
             // Set the umask to 0
             //
-            if (umask(0) < 0) fail(pipefd[1], "Can't set umask");
+            umask(0);
 
             //
             // Set the current directory to "/" to avoid blocking


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to