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

Commit 5be652db authored by Connor O'Brien's avatar Connor O'Brien Committed by Gerrit Code Review
Browse files

Merge "libtimeinstate: improve error handling in single-UID functions"

parents c5af19c5 b83af347
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -251,7 +251,7 @@ std::optional<std::vector<std::vector<uint64_t>>> getUidCpuFreqTimes(uint32_t ui
    for (uint32_t i = 0; i <= (maxFreqCount - 1) / FREQS_PER_ENTRY; ++i) {
        key.bucket = i;
        if (findMapEntry(gTisMapFd, &key, vals.data())) {
            if (errno != ENOENT) return {};
            if (errno != ENOENT || getFirstMapKey(gTisMapFd, &key)) return {};
            continue;
        }

@@ -362,7 +362,7 @@ std::optional<concurrent_time_t> getUidConcurrentTimes(uint32_t uid, bool retry)
    time_key_t key = {.uid = uid};
    for (key.bucket = 0; key.bucket <= (gNCpus - 1) / CPUS_PER_ENTRY; ++key.bucket) {
        if (findMapEntry(gConcurrentMapFd, &key, vals.data())) {
            if (errno != ENOENT) return {};
            if (errno != ENOENT || getFirstMapKey(gConcurrentMapFd, &key)) return {};
            continue;
        }
        auto offset = key.bucket * CPUS_PER_ENTRY;