@@ -280,7 +280,7 @@ _delete_array_map(_In_ _Post_invalid_ ebpf_core_map_t* map)
280
280
281
281
static ebpf_result_t
282
282
_find_array_map_entry (
283
- _In_ ebpf_core_map_t * map , _In_ const uint8_t * key , _In_ bool delete_on_success , _Outptr_ uint8_t * * data )
283
+ _In_ ebpf_core_map_t * map , _In_opt_ const uint8_t * key , _In_ bool delete_on_success , _Outptr_ uint8_t * * data )
284
284
{
285
285
uint32_t key_value ;
286
286
if (!map || !key || delete_on_success )
@@ -929,7 +929,7 @@ _delete_hash_map_entry(_In_ ebpf_core_map_t* map, _In_ const uint8_t* key);
929
929
930
930
static ebpf_result_t
931
931
_find_hash_map_entry (
932
- _In_ ebpf_core_map_t * map , _In_ const uint8_t * key , _In_ bool delete_on_success , _Outptr_ uint8_t * * data )
932
+ _In_ ebpf_core_map_t * map , _In_opt_ const uint8_t * key , _In_ bool delete_on_success , _Outptr_ uint8_t * * data )
933
933
{
934
934
uint8_t * value = NULL ;
935
935
if (!map || !key )
@@ -1254,14 +1254,15 @@ _create_lpm_map(
1254
1254
1255
1255
static ebpf_result_t
1256
1256
_find_lpm_map_entry (
1257
- _In_ ebpf_core_map_t * map , _In_ const uint8_t * key , _In_ bool delete_on_success , _Outptr_ uint8_t * * data )
1257
+ _In_ ebpf_core_map_t * map , _In_opt_ const uint8_t * key , _In_ bool delete_on_success , _Outptr_ uint8_t * * data )
1258
1258
{
1259
+ if (!map || !key || delete_on_success )
1260
+ return EBPF_INVALID_ARGUMENT ;
1261
+
1259
1262
uint32_t * prefix_length = (uint32_t * )key ;
1260
1263
uint32_t original_prefix_length = * prefix_length ;
1261
1264
uint8_t * value = NULL ;
1262
1265
ebpf_core_lpm_map_t * trie_map = EBPF_FROM_FIELD (ebpf_core_lpm_map_t , core_map , map );
1263
- if (!map || !key || delete_on_success )
1264
- return EBPF_INVALID_ARGUMENT ;
1265
1266
1266
1267
ebpf_bitmap_cursor_t cursor ;
1267
1268
ebpf_bitmap_start_reverse_search ((ebpf_bitmap_t * )trie_map -> data , & cursor );
0 commit comments