Skip to content

Commit

Permalink
fix(fsdrv): fix typo error in commit 752fba3 (#2732)
Browse files Browse the repository at this point in the history
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
  • Loading branch information
xiaoxiang781216 committed Oct 25, 2021
1 parent 752fba3 commit 47cdfa6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/extra/libs/fsdrv/lv_fs_posix.c
Expand Up @@ -167,7 +167,7 @@ static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf,
{
LV_UNUSED(drv);
*bw = write((lv_uintptr_t)file_p, buf, btw);
return (int32_t)*bw ? LV_FS_RES_UNKNOWN : LV_FS_RES_OK;
return (int32_t)*bw < 0 ? LV_FS_RES_UNKNOWN : LV_FS_RES_OK;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/extra/libs/fsdrv/lv_fs_stdio.c
Expand Up @@ -168,7 +168,7 @@ static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf,
{
LV_UNUSED(drv);
*bw = fwrite(buf, 1, btw, file_p);
return (int32_t)*bw ? LV_FS_RES_UNKNOWN : LV_FS_RES_OK;
return (int32_t)*bw < 0 ? LV_FS_RES_UNKNOWN : LV_FS_RES_OK;
}

/**
Expand Down

0 comments on commit 47cdfa6

Please sign in to comment.