浏览代码

fix: use brace init. for mklink file entry

greatbridf 2 年之前
父节点
当前提交
b103ac85fe
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/kernel/vfs.c

+ 1 - 1
src/kernel/vfs.c

@@ -154,7 +154,7 @@ static inline size_t _tmpfs_allocinode(struct tmpfs_data* data)
 static inline int _tmpfs_mklink(struct tmpfs_inode* dir, size_t ino, const char* filename)
 static inline int _tmpfs_mklink(struct tmpfs_inode* dir, size_t ino, const char* filename)
 {
 {
     struct tmpfs_file_entry ent = {
     struct tmpfs_file_entry ent = {
-        .filename = 0,
+        .filename = { 0 },
         .ino = ino,
         .ino = ino,
     };
     };
     snprintf(ent.filename, sizeof(ent.filename), filename);
     snprintf(ent.filename, sizeof(ent.filename), filename);