Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62ba2b11 authored by Bernie Innocenti's avatar Bernie Innocenti
Browse files

Add explicit Result::has_value() checks where needed

Test: m checkbuild continuous_instrumentation_tests continuous_instrumentation_tests_api_coverage continuous_native_tests device-tests platform_tests
Change-Id: Ifd5dcda48e370d750e243d427e68a77dce333951
parent cf110de8
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -142,7 +142,7 @@ Result<void> CoverageRecord::Open() {


void CoverageRecord::ResetFullRecord() {
void CoverageRecord::ResetFullRecord() {
    auto header_region = GetRegionBounds(COV_START);
    auto header_region = GetRegionBounds(COV_START);
    if (!header_region) {
    if (!header_region.ok()) {
        // If the header cannot be parsed, we can't reset the proper region yet.
        // If the header cannot be parsed, we can't reset the proper region yet.
        return;
        return;
    }
    }
@@ -202,7 +202,7 @@ void CoverageRecord::GetRawData(volatile void** begin, volatile void** end) {


void CoverageRecord::GetRawCounts(volatile uint8_t** begin, volatile uint8_t** end) {
void CoverageRecord::GetRawCounts(volatile uint8_t** begin, volatile uint8_t** end) {
    auto region = GetRegionBounds(COV_8BIT_COUNTERS);
    auto region = GetRegionBounds(COV_8BIT_COUNTERS);
    if (!region) {
    if (!region.ok()) {
        *begin = 0;
        *begin = 0;
        *end = 0;
        *end = 0;
        return;
        return;
@@ -216,7 +216,7 @@ void CoverageRecord::GetRawCounts(volatile uint8_t** begin, volatile uint8_t** e


void CoverageRecord::GetRawPCs(volatile uintptr_t** begin, volatile uintptr_t** end) {
void CoverageRecord::GetRawPCs(volatile uintptr_t** begin, volatile uintptr_t** end) {
    auto region = GetRegionBounds(COV_INSTR_PCS);
    auto region = GetRegionBounds(COV_INSTR_PCS);
    if (!region) {
    if (!region.ok()) {
        *begin = 0;
        *begin = 0;
        *end = 0;
        *end = 0;
        return;
        return;