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

Unified Diff: native_client_sdk/src/libraries/nacl_io/mount_node.cc

Issue 16122002: [NaCl SDK] MountNodeDir::GetDents sets d_off instead of leaving it undefined. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 7 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 | native_client_sdk/src/libraries/nacl_io/mount_node_dir.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/mount_node.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/mount_node.cc b/native_client_sdk/src/libraries/nacl_io/mount_node.cc
index 5fb32902902ad1b53fabb0b3c0079f47dd1d9829..ff722b44eb5c7d40e271e7e2f38b6b1882daaaa4 100644
--- a/native_client_sdk/src/libraries/nacl_io/mount_node.cc
+++ b/native_client_sdk/src/libraries/nacl_io/mount_node.cc
@@ -25,8 +25,11 @@ MountNode::MountNode(Mount* mount)
stat_.st_uid = USR_ID;
// Mount should normally never be NULL, but may be null in tests.
+ // If NULL, at least set the inode to a valid (nonzero) value.
if (mount_)
mount_->OnNodeCreated(this);
+ else
+ stat_.st_ino = 1;
}
MountNode::~MountNode() {
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/mount_node_dir.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698