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

lpmd_cpu: ensure online is initialized to zero #26

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

ColinIanKing
Copy link
Contributor

If the fscanf fails we end up with online in a undefined uninitalized state. Fix this by initializing online to zero.

Cleans up clang scan build warning:

src/lpmd_cpu.c:692:7: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
692 | if (!online)
| ^~~~~~~

If the fscanf fails we end up with online in a undefined uninitalized
state. Fix this by initializing online to zero.

Cleans up clang scan build warning:

src/lpmd_cpu.c:692:7: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
  692 |                 if (!online)
      |                     ^~~~~~~

Signed-off-by: Colin Ian King <[email protected]>
@zhang-rui zhang-rui merged commit 034fdd1 into intel:main Jun 5, 2024
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.

2 participants