Check the function we just called for errors, not an incoming argument. Noticed

by inspection.

llvm-svn: 190828
This commit is contained in:
Nick Lewycky 2013-09-17 00:23:28 +00:00
parent aa420d04b8
commit 885136d3b6
1 changed files with 1 additions and 1 deletions

View File

@ -685,7 +685,7 @@ uptr ReadBinaryName(/*out*/char *buf, uptr buf_len) {
uptr module_name_len = internal_readlink(
"/proc/self/exe", buf, buf_len);
int readlink_error;
if (internal_iserror(buf_len, &readlink_error)) {
if (internal_iserror(module_name_len, &readlink_error)) {
if (proc_self_exe_cache_len) {
// If available, use the cached module name.
CHECK_LE(proc_self_exe_cache_len, buf_len);