From 5815babc4f0f415ef4d7c312a041e5e92302ddd8 Mon Sep 17 00:00:00 2001 From: panzhe Date: Mon, 7 Sep 2026 09:55:18 +0800 Subject: [PATCH] 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). --- tests/test_util_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_util_file.c b/tests/test_util_file.c index 03ba3a4..aba8b71 100644 --- a/tests/test_util_file.c +++ b/tests/test_util_file.c @@ -233,7 +233,7 @@ static void test_read_valid_nested_with_fd(const char *testdir) 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); if (jso != NULL)