Skip to content

Commit 36f454a

Browse files
committed
Revert "Fix SMB implementation of VFS tell function"
This reverts commit e06ac22.
1 parent eb0788d commit 36f454a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

libretro-common/vfs/vfs_implementation_smb.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ int64_t retro_vfs_file_seek_smb(libretro_vfs_implementation_file *stream,
450450
/* return the current byte offset in an open file */
451451
int64_t retro_vfs_file_tell_smb(libretro_vfs_implementation_file *stream)
452452
{
453-
int64_t ret;
453+
uint64_t cur = 0;
454454
struct smb2fh *fh;
455455
struct smb2_context *ctx;
456456

@@ -468,13 +468,13 @@ int64_t retro_vfs_file_tell_smb(libretro_vfs_implementation_file *stream)
468468
if (!ctx)
469469
return -1;
470470

471-
if ((ret = smb2_lseek(ctx, fh, 0, SEEK_CUR, NULL)) == -EINVAL)
471+
if (smb2_lseek(ctx, fh, 0, SEEK_CUR, &cur) == -EINVAL)
472472
{
473473
RARCH_ERR("[SMB] Tell error: %s\n", smb2_get_error(ctx));
474474
return -1;
475475
}
476476

477-
return ret;
477+
return (int64_t)cur;
478478
}
479479

480480
int retro_vfs_file_close_smb(libretro_vfs_implementation_file *stream)

0 commit comments

Comments
 (0)