When the return type of the function is int, it's better to return an
authorRichard Levitte <levitte@openssl.org>
Thu, 9 Jun 2005 17:28:53 +0000 (17:28 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 9 Jun 2005 17:28:53 +0000 (17:28 +0000)
in than NULL, especially when an error is signalled with a negative
value.

crypto/dso/dso_lib.c

index 0869a646f650762f713814790cba2bff18b9f473..12ad097a284fa77e317727e77a2e0280864be221 100644 (file)
@@ -472,7 +472,7 @@ int DSO_pathbyaddr(void *addr,char *path,int sz)
        if (meth->pathbyaddr == NULL)
                {
                DSOerr(DSO_F_PATHBYADDR,DSO_R_UNSUPPORTED);
-               return(NULL);
+               return -1;
                }
        return (*meth->pathbyaddr)(addr,path,sz);
        }