fs/vfs: Zero file struct field with memset

to avoid set fields to zero one by one

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-05-07 02:42:18 +08:00
committed by Petro Karashchenko
parent 22d6f97843
commit 17f173d555
8 changed files with 15 additions and 26 deletions
+2 -2
View File
@@ -607,8 +607,8 @@ ssize_t nxffs_write(FAR struct file *filep, FAR const char *buffer,
/* Success.. return the number of bytes written */
ret = total;
filep->f_pos = wrfile->datlen;
ret = total;
filep->f_pos = wrfile->datlen;
errout_with_lock:
nxmutex_unlock(&volume->lock);