projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e69aaa8
)
Fix compiler warning by cast int to pointer
author
Teng Qin
<qinteng@fb.com>
Sun, 21 May 2017 05:46:00 +0000
(22:46 -0700)
committer
Teng Qin
<qinteng@fb.com>
Sun, 21 May 2017 05:46:00 +0000
(22:46 -0700)
src/cc/libbpf.c
patch
|
blob
|
history
diff --git
a/src/cc/libbpf.c
b/src/cc/libbpf.c
index d62275fd3c5ec212e37929bdf800c3928ac4b9d4..d78ae248076256bdd677622c35e8100370b3ee9b 100644
(file)
--- a/
src/cc/libbpf.c
+++ b/
src/cc/libbpf.c
@@
-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
// ~0 which will fail and return fast.
// 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;
// This means the key doesn't exist.
if (errno == ENOENT)