mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-27 10:22:40 +00:00
Make the naming of variables more obvious.
This commit is contained in:
parent
1ab1f3f320
commit
586c7dd30b
@ -64,10 +64,11 @@ impl Attribute {
|
||||
let mut names = Vec::new();
|
||||
let mut start = 0;
|
||||
for end in idx {
|
||||
let c_end = end + 1; // end of the c-string (including 0)
|
||||
let size = unsafe {
|
||||
getxattr(
|
||||
c_path.as_ptr(),
|
||||
buf[start..end+1].as_ptr() as *const c_char,
|
||||
buf[start..c_end].as_ptr() as *const c_char,
|
||||
ptr::null_mut(), 0, 0, c_flags
|
||||
)
|
||||
};
|
||||
@ -81,7 +82,7 @@ impl Attribute {
|
||||
size: size as usize
|
||||
});
|
||||
}
|
||||
start = end + 1;
|
||||
start = c_end;
|
||||
}
|
||||
Ok(names)
|
||||
} else {
|
||||
|
@ -59,10 +59,11 @@ impl Attribute {
|
||||
let mut names = Vec::new();
|
||||
let mut start = 0;
|
||||
for end in idx {
|
||||
let c_end = end + 1; // end of the c-string (including 0)
|
||||
let size = unsafe {
|
||||
getxattr(
|
||||
c_path.as_ptr(),
|
||||
buf[start..end+1].as_ptr() as *const c_char,
|
||||
buf[start..c_end].as_ptr() as *const c_char,
|
||||
ptr::null_mut(), 0
|
||||
)
|
||||
};
|
||||
@ -72,7 +73,7 @@ impl Attribute {
|
||||
size: size as usize
|
||||
});
|
||||
}
|
||||
start = end + 1;
|
||||
start = c_end;
|
||||
}
|
||||
Ok(names)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user