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

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

Issue 796123002: Fix TODO by removing use of getwd() in nacl-spawn (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 6 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/nacl-spawn/nacl_spawn.cc
diff --git a/ports/nacl-spawn/nacl_spawn.cc b/ports/nacl-spawn/nacl_spawn.cc
index f86cfb83b32ab135698a184a690316feade13445..8208755ee7e459e63df4812a0c554e69c7fda270 100644
--- a/ports/nacl-spawn/nacl_spawn.cc
+++ b/ports/nacl-spawn/nacl_spawn.cc
@@ -53,15 +53,11 @@ struct NaClSpawnReply {
};
static std::string GetCwd() {
- char cwd[PATH_MAX + 1];
- // TODO(hamaji): Remove this #if and always call getcwd.
- // https://code.google.com/p/naclports/issues/detail?id=109
binji 2014/12/11 23:19:57 reference this bug?
-#if defined(__GLIBC__)
- if (!getwd(cwd))
-#else
- if (!getcwd(cwd, PATH_MAX))
-#endif
+ char cwd[PATH_MAX] = ".";
+ if (!getcwd(cwd, PATH_MAX)) {
+ NACL_LOG("getcwd failed: %s\n", strerror(errno));
assert(0);
+ }
return cwd;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698