зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1841917 - Fix "variable does not need to be mutable" warnings. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D182848
This commit is contained in:
Родитель
da503f0969
Коммит
a1b423e033
|
@ -455,7 +455,7 @@ extern "C" fn C_GetAttributeValue(
|
|||
return CKR_DEVICE_ERROR;
|
||||
}
|
||||
for i in 0..ulCount as usize {
|
||||
let mut attr = unsafe { &mut *pTemplate.offset(i as isize) };
|
||||
let attr = unsafe { &mut *pTemplate.offset(i as isize) };
|
||||
// NB: the safety of this array access depends on the length check above
|
||||
if let Some(attr_value) = &values[i] {
|
||||
if attr.pValue.is_null() {
|
||||
|
|
|
@ -534,7 +534,7 @@ extern "C" fn C_GetAttributeValue(
|
|||
return CKR_DEVICE_ERROR;
|
||||
}
|
||||
for (i, value) in values.iter().enumerate().take(ulCount as usize) {
|
||||
let mut attr = unsafe { &mut *pTemplate.add(i) };
|
||||
let attr = unsafe { &mut *pTemplate.add(i) };
|
||||
if let Some(attr_value) = value {
|
||||
if attr.pValue.is_null() {
|
||||
attr.ulValueLen = attr_value.len() as CK_ULONG;
|
||||
|
|
Загрузка…
Ссылка в новой задаче