Fix uninitialized variable bug in sdcard emulator

- Following members were not initialized in fuse_init().
  fuse->root.actual_name
  fuse->root.gen
- Initialize fuse->root with memset().

Change-Id: I4bce754ace608b526961f59049b2d780fd99756f
This commit is contained in:
Terry Heo (Woncheol) 2011-03-16 13:02:05 +09:00
parent d6851475e0
commit 8349cce829
1 changed files with 1 additions and 7 deletions

View File

@ -326,15 +326,9 @@ void fuse_init(struct fuse *fuse, int fd, const char *path)
fuse->all = &fuse->root;
memset(&fuse->root, 0, sizeof(fuse->root));
fuse->root.nid = FUSE_ROOT_ID; /* 1 */
fuse->root.next = 0;
fuse->root.child = 0;
fuse->root.parent = 0;
fuse->root.all = 0;
fuse->root.refcount = 2;
fuse->root.name = 0;
rename_node(&fuse->root, path);
}