Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/cpu_features.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2022-11-09 19:01:16 +0300
committerGuillaume Chatelet <gchatelet@google.com>2022-11-09 19:01:16 +0300
commit5dd1e39321ab4b9f980b62103069bae46f829d1d (patch)
tree1dbb58507fbfe4871a68ba37dc0ba38218e567fc
parent373adb1273d603d52a1e5b8cb1ff7a42f32fdf15 (diff)
Fix early returnDaniAffCH_riscv
-rw-r--r--src/impl_riscv_linux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/impl_riscv_linux.c b/src/impl_riscv_linux.c
index 4f6ae90..3686697 100644
--- a/src/impl_riscv_linux.c
+++ b/src/impl_riscv_linux.c
@@ -57,7 +57,7 @@ static bool HandleRiscVLine(const LineResult result, RiscvInfo* const info) {
if (CpuFeatures_StringView_GetAttributeKeyValue(line, &key, &value)) {
if (CpuFeatures_StringView_IsEquals(key, str("isa"))) {
StringView prefix = str("rv");
- if (!CpuFeatures_StringView_StartsWith(value, prefix)) continue;
+ if (!CpuFeatures_StringView_StartsWith(value, prefix)) return true;
value = CpuFeatures_StringView_PopFront(value, prefix.size);
for (size_t i = 0; i < RISCV_LAST_; ++i) {
StringView flag = str(kCpuInfoFlags[i]);
@@ -67,7 +67,7 @@ static bool HandleRiscVLine(const LineResult result, RiscvInfo* const info) {
}
if (CpuFeatures_StringView_IsEquals(key, str("uarch"))) {
int index = CpuFeatures_StringView_IndexOfChar(value, ',');
- if (index == -1) continue;
+ if (index == -1) return true;
StringView vendor = CpuFeatures_StringView_KeepFront(value, index);
StringView uarch = CpuFeatures_StringView_PopFront(value, index + 1);
CpuFeatures_StringView_CopyString(vendor, info->vendor,