mirror of
https://github.com/json-c/json-c.git
synced 2026-11-05 21:20:16 +08:00
Fix swapped lseek() arguments
lseek() expects (fd, offset, whence). The test passed (fd, SEEK_SET, 0), which does not conform to the function signature. It should be corrected to (fd, 0, SEEK_SET).
This commit is contained in:
1 parent
befb5a0b26
commit
5815babc4f
1 file changed
+1
-1
@@ -233,7 +233,7 @@ static void test_read_valid_nested_with_fd(const char *testdir)
|
|||||||
json_util_get_last_err());
|
json_util_get_last_err());
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)lseek(d, SEEK_SET, 0);
|
(void)lseek(d, 0, SEEK_SET);
|
||||||
|
|
||||||
jso = json_object_from_fd_ex(d, 3);
|
jso = json_object_from_fd_ex(d, 3);
|
||||||
if (jso != NULL)
|
if (jso != NULL)
|
||||||
|
|||||||
Reference in new issue
Block a user