Skip to content

Commit

Permalink
fs: clean up around fs_type
Browse files Browse the repository at this point in the history
fs_ls(), fs_mkdir() and fs_unlink() sets fs_type to FS_TYPE_ANY
explicitly, but it is redundant as they call fs_close().
So just remove those lines.

Signed-off-by: AKASHI Takahiro <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
  • Loading branch information
AKASHI Takahiro authored and xypron committed Oct 17, 2019
1 parent e4bad9f commit 185aed7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ int fs_ls(const char *dirname)

ret = info->ls(dirname);

fs_type = FS_TYPE_ANY;
fs_close();

return ret;
Expand Down Expand Up @@ -597,7 +596,6 @@ int fs_unlink(const char *filename)

ret = info->unlink(filename);

fs_type = FS_TYPE_ANY;
fs_close();

return ret;
Expand All @@ -611,7 +609,6 @@ int fs_mkdir(const char *dirname)

ret = info->mkdir(dirname);

fs_type = FS_TYPE_ANY;
fs_close();

return ret;
Expand Down

0 comments on commit 185aed7

Please sign in to comment.