Chromium Code Reviews| Index: native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc |
| diff --git a/native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc b/native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc |
| index 3b04296841b76f170912288bb482ee4e01ad5807..b7f91351ecfc8f950440d7c6dfc001200813c916 100644 |
| --- a/native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc |
| +++ b/native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc |
| @@ -248,7 +248,8 @@ Error DevFs::OpenWithMode(const Path& path, int open_flags, |
| if (path.Size() == 3) { |
| error = fs_dir_->FindChild(path.Part(2), out_node); |
| } else { |
| - LOG_TRACE("Bad devfs path: %s", path.Join().c_str()); |
| + std::string path_str(path.Join()); |
|
khim
2015/04/17 21:20:05
Fly-by comment: why "std:sttring" here? Why not "c
binji
2015/04/20 22:35:28
Done.
|
| + LOG_TRACE("Bad devfs path: %s", path_str.c_str()); |
| error = ENOENT; |
| } |
| } else { |
| @@ -257,7 +258,8 @@ Error DevFs::OpenWithMode(const Path& path, int open_flags, |
| // Only return EACCES when trying to create a node that does not exist. |
| if ((error == ENOENT) && (open_flags & O_CREAT)) { |
| - LOG_TRACE("Cannot create devfs node: %s", path.Join().c_str()); |
| + std::string path_str(path.Join()); |
| + LOG_TRACE("Cannot create devfs node: %s", path_str.c_str()); |
| return EACCES; |
| } |