浏览代码

dfs: assert the path is not null in dfs_filesystem_lookup

Clang complains about "Null pointer argument in call to string
comparison function". So assert on it.
Grissiom 12 年之前
父节点
当前提交
4b7e9c6447
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      components/dfs/src/dfs_fs.c

+ 2 - 0
components/dfs/src/dfs_fs.c

@@ -85,6 +85,8 @@ struct dfs_filesystem *dfs_filesystem_lookup(const char *path)
 
     prefixlen = 0;
 
+    RT_ASSERT(path);
+
     /* lock filesystem */
     dfs_lock();