Skip to content

Fix uninitialized variables#3470

Open
fhassan-ibm wants to merge 2 commits into
linux-nvme:masterfrom
fhassan-ibm:fix-uninitialized-variables
Open

Fix uninitialized variables#3470
fhassan-ibm wants to merge 2 commits into
linux-nvme:masterfrom
fhassan-ibm:fix-uninitialized-variables

Conversation

@fhassan-ibm

Copy link
Copy Markdown

The result variable in get_feature_id_changed() and the flags variable in passthru() were uninitialized before use, which could cause undefined behavior. Initialize both to 0 to prevent this.

The result variable was uninitialized before being passed to get_feature_id().
Initialize it to 0 to prevent undefined behavior.

Signed-off-by: Fahim Hassan <fahim.hassan@ibm.com>
The flags variable was uninitialized before use in io_passthru().
Initialize it to 0 to prevent undefined behavior.

Signed-off-by: Fahim Hassan <fahim.hassan@ibm.com>
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