Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(952)

Unified Diff: ports/nacl-spawn/elf_reader.cc

Issue 1553053002: Update pnacl toolchain build (Closed) Base URL: https://chromium.googlesource.com/webports.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ports/nacl-spawn/include/nacl_spawn.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/nacl-spawn/elf_reader.cc
diff --git a/ports/nacl-spawn/elf_reader.cc b/ports/nacl-spawn/elf_reader.cc
index 00367a080c9861de5d9f7927fdb2c8f79fc3f13b..1654a02e495bea3e1ee88f1fc7f7023910a38633 100644
--- a/ports/nacl-spawn/elf_reader.cc
+++ b/ports/nacl-spawn/elf_reader.cc
@@ -33,7 +33,7 @@ ElfReader::ElfReader(const char* filename)
: filename_(filename), is_valid_(false), is_static_(false) {
ScopedFile fp(fopen(filename, "rb"));
if (!fp.get()) {
- PrintError("failed to open file");
+ PrintError("failed to open file: %s", strerror(errno));
return;
}
@@ -247,10 +247,7 @@ void ElfReader::PrintError(const char* fmt, ...) {
if (written >= kBufSize)
buf[kBufSize-1] = '\0';
- if (errno)
- fprintf(stderr, "%s: %s: %s\n", filename_, buf, strerror(errno));
- else
- fprintf(stderr, "%s: %s\n", filename_, buf);
+ fprintf(stderr, "%s: %s\n", filename_, buf);
}
#if defined(DEFINE_ELF_READER_MAIN)
« no previous file with comments | « no previous file | ports/nacl-spawn/include/nacl_spawn.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698