Procházet zdrojové kódy

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 před 11 roky
rodič
revize
4b7e9c6447
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  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();