summaryrefslogtreecommitdiff
path: root/openbsd-compat/port-solaris.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2016-10-26 08:43:25 +1100
committerDarren Tucker <dtucker@zip.com.au>2016-10-26 08:43:25 +1100
commitb4e96b4c9bea4182846e4942ba2048e6d708ee54 (patch)
treebf113d6252dd709577e8a5310faf1aef289f776c /openbsd-compat/port-solaris.c
parent1c4ef0b808d3d38232aeeb1cebb7e9a43def42c5 (diff)
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.
Diffstat (limited to 'openbsd-compat/port-solaris.c')
-rw-r--r--openbsd-compat/port-solaris.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/port-solaris.c b/openbsd-compat/port-solaris.c
index bb8fccb4..0e89dc32 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)