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

Fixed the for loop condition and judgment condition of the get_cpu_affinity function #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhangfatboy
Copy link

  1. Initialization of mask

mask is initialized to 0, but in later code, if (mask! = 0) This condition is meaningless because mask is always 0. This conditional judgment should be removed.

  1. The loop condition is incorrect

Loop for (i = 31; i <= 0; The condition of i--) is wrong. i <= 0 causes the loop to terminate immediately because the initial value of i is 31, which does not satisfy the condition of i <= 0. i >= 0 instead.

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.

1 participant