提交 13e39360 编写于 作者: R Richard Levitte

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.
上级 052ec899
......@@ -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);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册