chore: fix almost *ALL* warnings.
[lunaix-os.git] / lunaix-os / kernel / fs / xattr.c
index 6fdb300727f574972c5c3b99d104956681111efd..3fa09a0a8e564ccd945cb066453a25a453cde992 100644 (file)
@@ -15,7 +15,8 @@ xattr_new(struct hstr* name)
         return NULL;
     }
     *entry =
-      (struct v_xattr_entry){ .name = HHSTR(valloc(VFS_NAME_MAXLEN), 0, 0) };
+      (struct v_xattr_entry){ .name = HHSTR(valloc(VFS_NAME_MAXLEN), 0, 0),
+                              .value = NULL };
 
     hstrcpy(&entry->name, name);
     return entry;
@@ -24,7 +25,7 @@ xattr_new(struct hstr* name)
 void
 xattr_free(struct v_xattr_entry* entry)
 {
-    vfree(entry->name.value);
+    vfree((void*)entry->name.value);
     vfree(entry);
 }