Skip to content

Commit e103b89

Browse files
xiaoxiang781216GUIDINGLI
authored andcommitted
fs/userfs: clean up userfs implementation
1. Remove unneeded casts: drop (int)nsent, (int)nrecvd, (unsigned int)nrecvd, (intmax_t)filep->f_pos, (unsigned long)offset, (FAR void *)priv, and similar redundant casts. Use %zd and PRIdOFF format specifiers instead. 2. Merge multi-line DEBUGASSERT into more compact form. 3. Replace sizeof(struct xxx) with sizeof(*variable) or sizeof(variable) throughout both files for better type safety. e.g. sizeof(*req), sizeof(*resp), sizeof(*buf), sizeof(priv->server), sizeof(info->client), etc. 4. Remove duplicate forward declaration of userfs_read. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Signed-off-by: jingfei <jingfei@xiaomi.com>
1 parent 67d5730 commit e103b89

2 files changed

Lines changed: 306 additions & 333 deletions

File tree

0 commit comments

Comments
 (0)