BpfMap: Specify zero to be default map_flags in constructor

Bug: 149963652
Test: atest
Change-Id: I0a9311bdadffc0fda75f153b3e2617fb082d3ddb
This commit is contained in:
Hungming Chen 2020-03-05 14:47:53 +08:00
parent 406e92d02c
commit 6161ff246f

View file

@ -57,7 +57,7 @@ class BpfMap {
public:
explicit BpfMap<Key, Value>(const char* pathname) : BpfMap<Key, Value>(pathname, 0) {}
BpfMap<Key, Value>(bpf_map_type map_type, uint32_t max_entries, uint32_t map_flags) {
BpfMap<Key, Value>(bpf_map_type map_type, uint32_t max_entries, uint32_t map_flags = 0) {
int map_fd = createMap(map_type, sizeof(Key), sizeof(Value), max_entries, map_flags);
if (map_fd >= 0) mMapFd.reset(map_fd);
}