Skip to content

Commit 2e0d56d

Browse files
author
Michael Agun
committed
fix SAL
1 parent ec8fbad commit 2e0d56d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/ebpf_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ extern "C"
903903
size_t page_cnt,
904904
perf_buffer_sample_fn sample_cb,
905905
perf_buffer_lost_fn lost_cb,
906-
void* ctx,
906+
_In_opt_ void* ctx,
907907
_In_opt_ const struct ebpf_perf_buffer_opts* opts) EBPF_NO_EXCEPT;
908908

909909
#ifdef __cplusplus

libs/api/libbpf_map.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,14 +491,14 @@ perf_buffer__new(
491491
return ebpf_perf_buffer__new(map_fd, page_cnt, sample_cb, lost_cb, ctx, &ebpf_opts);
492492
}
493493

494-
struct perf_buffer*
494+
_Ret_maybenull_ struct perf_buffer*
495495
ebpf_perf_buffer__new(
496496
int map_fd,
497497
size_t page_cnt,
498498
perf_buffer_sample_fn sample_cb,
499499
perf_buffer_lost_fn lost_cb,
500-
void* ctx,
501-
const struct ebpf_perf_buffer_opts* opts) EBPF_NO_EXCEPT
500+
_In_opt_ void* ctx,
501+
_In_opt_ const struct ebpf_perf_buffer_opts* opts) EBPF_NO_EXCEPT
502502
{
503503
ebpf_result result = EBPF_SUCCESS;
504504
perf_buffer_t* local_perf_buffer = nullptr;

0 commit comments

Comments
 (0)