Commit 9190ef5b authored by Teng Qin's avatar Teng Qin

Fix compiler warning by cast int to pointer

parent e69aaa80
...@@ -159,7 +159,7 @@ int bpf_get_first_key(int fd, void *key, size_t key_size) ...@@ -159,7 +159,7 @@ int bpf_get_first_key(int fd, void *key, size_t key_size)
// trigger a page fault in kernel and affect performence. Hence we use // trigger a page fault in kernel and affect performence. Hence we use
// ~0 which will fail and return fast. // ~0 which will fail and return fast.
// This should fail since we pass an invalid pointer for value. // This should fail since we pass an invalid pointer for value.
if (bpf_lookup_elem(fd, key, ~0) >= 0) if (bpf_lookup_elem(fd, key, (void *)~0) >= 0)
return -1; return -1;
// This means the key doesn't exist. // This means the key doesn't exist.
if (errno == ENOENT) if (errno == ENOENT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment