mirror of git://anongit.mindrot.org/openssh.git
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.
This commit is contained in:
parent
1c4ef0b808
commit
b4e96b4c9b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue