[openssh-commits] [openssh] 01/01: Use !=NULL instead of >0 for getdefaultproj.

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Oct 26 08:47:52 AEDT 2016


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit b4e96b4c9bea4182846e4942ba2048e6d708ee54
Author: Darren Tucker <dtucker at zip.com.au>
Date:   Wed Oct 26 08:43:25 2016 +1100

    Use !=NULL instead of >0 for getdefaultproj.
    
    getdefaultproj() returns a pointer so test it for NULL inequality
    instead of >0.  Fixes compiler warning and is more correct.  Patch from
    David Binderman.
---
 openbsd-compat/port-solaris.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbsd-compat/port-solaris.c b/openbsd-compat/port-solaris.c
index bb8fccb..0e89dc3 100644
--- a/openbsd-compat/port-solaris.c
+++ b/openbsd-compat/port-solaris.c
@@ -213,7 +213,7 @@ solaris_set_default_project(struct passwd *pw)
 
 	/* get default project, if we fail just return gracefully  */
 	if ((defaultproject = getdefaultproj(pw->pw_name, &tempproject, &buf,
-	    sizeof(buf))) > 0) {
+	    sizeof(buf))) != NULL) {
 		/* set default project */
 		if (setproject(defaultproject->pj_name, pw->pw_name,
 		    TASK_NORMAL) != 0)

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list