Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for FreeBSD on x86 #163

Merged
merged 8 commits into from
Jul 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Also make line non const so it can be changed.
  • Loading branch information
gchatelet committed Jul 2, 2021
commit 6ceeefc3598e0af5e41791af3deadfb1474ce54b
2 changes: 1 addition & 1 deletion src/cpuinfo_x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ static void ParseCpuId(const uint32_t max_cpuid_leaf, X86Info* info,
StackLineReader_Initialize(&reader, fd);
for (;;) {
Copy link
Collaborator

@Mizux Mizux Jun 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, is there any difference with using while (true) { ?
EDIT: you're using for (;;) also just below so for consistency, we should at least use the same semantic in both cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No difference between for(;;) and while(true). We could use either one.

const LineResult result = StackLineReader_NextLine(&reader);
const StringView line = result.line;
StringView line = result.line;
const bool is_feature =
CpuFeatures_StringView_StartsWith(line, str(" Features="));
const bool is_feature2 =
Expand Down