Skip to content

Commit 38159a0

Browse files
committed
libbpf-cargo: Rename MapSkelConfig::p member to map
Rename the MapSkelConfig::p member to map, in an attempt to make the name somewhat more meaningful. Signed-off-by: Daniel Müller <[email protected]>
1 parent 6c9033d commit 38159a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libbpf-rs/src/skeleton.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use crate::Result;
3131
#[derive(Debug)]
3232
struct MapSkelConfig {
3333
name: String,
34-
p: Box<*mut bpf_map>,
34+
map: Box<*mut bpf_map>,
3535
mmaped: Option<Box<*mut c_void>>,
3636
}
3737

@@ -95,7 +95,7 @@ impl<'dat> ObjectSkeletonConfigBuilder<'dat> {
9595

9696
self.maps.push(MapSkelConfig {
9797
name: name.as_ref().to_string(),
98-
p: Box::new(ptr::null_mut()),
98+
map: Box::new(ptr::null_mut()),
9999
mmaped: m,
100100
});
101101

@@ -137,7 +137,7 @@ impl<'dat> ObjectSkeletonConfigBuilder<'dat> {
137137
// leak. Extremely unlikely to have invalid unicode anyways.
138138
(*current_map).name = str_to_cstring_and_pool(&map.name, string_pool)
139139
.expect("Invalid unicode in map name");
140-
(*current_map).map = &mut *map.p;
140+
(*current_map).map = &mut *map.map;
141141
(*current_map).mmaped = if let Some(ref mut mmaped) = map.mmaped {
142142
&mut **mmaped
143143
} else {

0 commit comments

Comments
 (0)