Skip to content

Commit 90645f4

Browse files
authored
Merge pull request #901 from liujinhui-job/fix-ff_hook_syscall.c-compile-error
fix ff_hook_syscall.c compile error
2 parents 515b916 + dbf4887 commit 90645f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adapter/syscall/ff_hook_syscall.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ ff_hook_recv(int fd, void *buf, size_t len, int flags)
844844
}
845845

846846
ssize_t
847-
ff_hook___recv_chk(int fd, void *buf, size_t buflen, size_t len, int flags)
847+
ff_hook___recv_chk(int fd, void *buf, size_t len, size_t buflen, int flags)
848848
{
849849
DEBUG_LOG("ff_hook___recv_chk, fd:%d, buf:%p, len:%lu, flags:%d\n",
850850
fd, buf, len, flags);
@@ -1479,7 +1479,7 @@ ff_hook___read_chk(int fd, void *buf, size_t nbytes, size_t len)
14791479
{
14801480
DEBUG_LOG("ff_hook___read_chk, fd:%d, buf:%p, len:%lu\n", fd, buf, len);
14811481

1482-
if (buflen < nbytes)
1482+
if (len < nbytes)
14831483
__chk_fail();
14841484

14851485
if (buf == NULL || len == 0) {
@@ -2620,8 +2620,8 @@ ff_hook_select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds,
26202620
struct timespec t_s, t_n;
26212621
time_t now_time_ms = 0;
26222622
time_t end_time_ms = 0;
2623-
int ff_set_words, ff_set_bytes;
2624-
int kernel_set_words, kernel_set_bytes;
2623+
int ff_set_words, ff_set_bytes = 0;
2624+
int kernel_set_words, kernel_set_bytes = 0;
26252625
int kernel_ret = 0;
26262626

26272627
DEBUG_LOG("ff_hook_select nfds:%d\n", nfds);

0 commit comments

Comments
 (0)