mirror of https://github.com/acidanthera/audk.git
ShellPkg/UefiShellLib: Only write value if successful conversion
The ShellConvertStringToUint64() function documentation says: "Upon a successful return the value of the conversion." So do not write any value if the conversion failed. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
This commit is contained in:
parent
f34a945a80
commit
d63d5884d7
|
@ -4234,15 +4234,17 @@ ShellConvertStringToUint64 (
|
|||
Status = InternalShellStrDecimalToUint64 (Walker, &RetVal, StopAtSpace);
|
||||
}
|
||||
|
||||
if ((Value == NULL) && !EFI_ERROR (Status)) {
|
||||
return (EFI_NOT_FOUND);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (Value != NULL) {
|
||||
*Value = RetVal;
|
||||
if (Value == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
return (Status);
|
||||
*Value = RetVal;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue