dfs_fs.c: fix null pointer bug, optimized redundant loop.
dfs_elm.c: fix the return value of the function is not uniform.