port-solaris.c:218: bad compare ?

David Binderman dcb314 at hotmail.com
Tue Oct 25 17:18:49 AEDT 2016


Hello there,


port-solaris.c:218]: (style) A pointer can not be negative so it is either pointless or an error to check if it is not.

Source code is

    if ((defaultproject = getdefaultproj(pw->pw_name, &tempproject, &buf,
        sizeof(buf))) > 0) {

Maybe better code

    if ((defaultproject = getdefaultproj(pw->pw_name, &tempproject, &buf,
        sizeof(buf))) != 0) {

Regards

David Binderman





More information about the openssh-unix-dev mailing list