aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/xenpaging/file_ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/xenpaging/file_ops.c b/tools/xenpaging/file_ops.c
index 079d2551a8..9351e168bd 100644
--- a/tools/xenpaging/file_ops.c
+++ b/tools/xenpaging/file_ops.c
@@ -26,12 +26,12 @@
static int file_op(int fd, void *page, int i,
ssize_t (*fn)(int, void *, size_t))
{
- off_t seek_ret;
+ off_t offset = i;
int total = 0;
int bytes;
- seek_ret = lseek(fd, i << PAGE_SHIFT, SEEK_SET);
- if ( seek_ret == (off_t)-1 )
+ offset = lseek(fd, offset << PAGE_SHIFT, SEEK_SET);
+ if ( offset == (off_t)-1 )
return -1;
while ( total < PAGE_SIZE )