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

FIX:TS-2258-mac cpuinfo has an extra enter character #18916

Merged
merged 2 commits into from
Dec 13, 2022

Conversation

facetosea
Copy link
Contributor

No description provided.

Comment on lines 357 to 359
if (cpuModel[strlen(cpuModel)-1] == '\n') {
cpuModel[strlen(cpuModel)-1] = '\0';
}
Copy link
Contributor

Choose a reason for hiding this comment

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

先取 strlen 的值,然后再使用,否则 coverity 会报错

Copy link
Contributor

@sangshuduo sangshuduo left a comment

Choose a reason for hiding this comment

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

see my comment

Copy link
Contributor

@sangshuduo sangshuduo left a comment

Choose a reason for hiding this comment

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

LGTM

@sangshuduo sangshuduo merged commit b03e3a8 into 3.0 Dec 13, 2022
@facetosea facetosea deleted the FIX/xsren/TS-2258-mac-cpuInfo branch December 29, 2022 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants