libfile: Fix incorrect lseek check in open_and_lseek()
We can't use "int" to capture output of lseek which is "loff_t", since
former does not cover all of the range of the values of the latter and
any pos >= 0xffff_ffff will result in a false positive "failure". To
avoid that replace the check to check that new position matches what
was requested.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 684a457 commit cd4f8f89d3f71ba3a0a29fa212f5cc2cb8793c7f
@Andrey Smirnov Andrey Smirnov authored on 29 Jan 2019
Sascha Hauer committed on 6 Feb 2019
Showing 1 changed file
View
lib/libfile.c