瀏覽代碼

[LibOS] Remove nonsense check in shim_namei.c:eat_slashes()

Isaku Yamahata 6 年之前
父節點
當前提交
8afbe0f82f
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      LibOS/shim/src/fs/shim_namei.c

+ 2 - 1
LibOS/shim/src/fs/shim_namei.c

@@ -42,7 +42,8 @@
  * Must be a null-terminated string. */
 static inline const char * eat_slashes (const char * string)
 {
-    while (*string == '/' && *string != '\0') string++;
+    while (*string == '/')
+        string++;
     return string;
 }