Uses the fact that: lseek(fd, 0, SEEK_CUR) is merely getting the current file position,
which we have already tracked in in_pos.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
****************************************************************************/
static int handle_ne_file(files_struct *fsp,
- off_t in_pos_unused,
+ off_t in_pos,
char *fname,
char *buf,
uint32_t *major,
unsigned int i;
ssize_t byte_count;
int ret = -1;
- off_t in_pos = -1;
if (CVAL(buf,NE_HEADER_TARGET_OS_OFFSET) != NE_HEADER_TARGOS_WIN ) {
DBG_NOTICE("NE file [%s] wrong target OS = 0x%x\n",
* Compute skip alignment to next
* long address.
*/
- off_t cpos = SMB_VFS_LSEEK(fsp,
- 0,
- SEEK_CUR);
-
+ off_t cpos = in_pos;
int skip = -(cpos - (byte_count - i) +
sizeof(VS_SIGNATURE)) & 3;
if (IVAL(buf,