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:
parent
052ec89927
commit
13e393607b
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user