When the return type of the function is int, it's better to return an

in than NULL, especially when an error is signalled with a negative
value.
This commit is contained in:
Richard Levitte 2005-06-09 17:28:53 +00:00
parent 052ec89927
commit 13e393607b

View 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);
}