Merge pull request #27 from tw4452852/minor_fix_for_stackid

bpf: fix a minor bug due to stackid allocation
pull/15/merge
Alessandro Decina 4 years ago committed by GitHub
commit b3ecbe7c54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,7 +28,7 @@ impl StackTrace {
} }
} }
pub unsafe fn get_stackid<C: BpfContext>(&mut self, ctx: &C, flags: u64) -> Result<u32, i64> { pub unsafe fn get_stackid<C: BpfContext>(&mut self, ctx: &C, flags: u64) -> Result<i64, i64> {
let ret = bpf_get_stackid( let ret = bpf_get_stackid(
ctx.as_ptr(), ctx.as_ptr(),
&mut self.def as *mut _ as *mut _, &mut self.def as *mut _ as *mut _,
@ -37,7 +37,7 @@ impl StackTrace {
if ret < 0 { if ret < 0 {
Err(ret) Err(ret)
} else { } else {
Ok(ret as u32) Ok(ret)
} }
} }
} }
Loading…
Cancel
Save