Skip to contentSkip to conversation

libnsm.a: modify return value to false from 0 at nsm_drop_privileges()

PATCH In review Mi Jinlong 2 participants 3 messages Dec 24, 2010 – Jan 4, 2011

Subsystems (2)
lore
Share & tools
lore

Mi Jinlong

author
#0 lore raw

PATCH 1/1 libnsm.a: modify return value to false from 0 at nsm_drop_privileges()

At nsm_drop_privileges(), for improving readability, unify the return value.

---
 support/nsm/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
support/nsm/file.c +1 -1
index e21c7d4..98b47bf 100644
@@ -421,7 +421,7 @@ nsm_drop_privileges(const int pidfd)
 	 */
         if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) == -1) {
                 xlog(L_ERROR, "prctl(PR_SET_KEEPCAPS) failed: %m");
-		return 0;
+		return false;
 	}
 
 	if (setgroups(0, NULL) == -1) {
Signature · 1 line
1.7.3.3
author
#1 lore raw

PATCH 1/1 libnsm.a: modify return value to false from 0 at nsm_drop_privileges()

At nsm_drop_privileges(), for improving readability, unify the return value.

---
 support/nsm/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
support/nsm/file.c +1 -1
index e21c7d4..98b47bf 100644
@@ -421,7 +421,7 @@ nsm_drop_privileges(const int pidfd)
 	 */
         if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) == -1) {
                 xlog(L_ERROR, "prctl(PR_SET_KEEPCAPS) failed: %m");
-		return 0;
+		return false;
 	}
 
 	if (setgroups(0, NULL) == -1) {

-- 1.7.3.3

#2 lore raw
In reply to Mi Jinlong
Quoted 12 lines · Mi Jinlong

At nsm_drop_privileges(), for improving readability, unify the return value.

---
 support/nsm/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
support/nsm/file.c +0 -0
index e21c7d4..98b47bf 100644

support/nsm/file.c nsm_drop_privileges(const int pidfd) · line 427

Quoted 8 lines
support/nsm/file.c +1 -1
@@ -421,7 +421,7 @@ nsm_drop_privileges(const int pidfd)
 	 */
         if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) == -1) {
                 xlog(L_ERROR, "prctl(PR_SET_KEEPCAPS) failed: %m");
-		return 0;
+		return false;
 	}
 
 	if (setgroups(0, NULL) == -1) {

Committed... Thanks!

steved