8885118f82
The returned value of lseek is a virtual address which can be different from the offset. Indeed, if the return address has a 64-bit canonical form, the 16 higher bits are all 1 if bit 47 is 1. So the check was wrong. It is better to test against an error value. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Damien Millescamps <damien.millescamps@6wind.com>