Skip to content

linuxHelpers.cpp fixes - #36

Merged
Kevin Sheldrake (kesheldr) merged 2 commits into
microsoft:mainfrom
ckane:linuxHelpers-fixes
Nov 4, 2021
Merged

linuxHelpers.cpp fixes#36
Kevin Sheldrake (kesheldr) merged 2 commits into
microsoft:mainfrom
ckane:linuxHelpers-fixes

Conversation

@ckane

Copy link
Copy Markdown
Contributor

Inconsistent return value as well as fix up the LARGE_INTEGER struct initialization in GetProcess

Elsewhere in this function, false and true are returned, and the
comments even say that it only returns true or false. However, there's
one spot where "return NULL" exists, so replace that with a "return
false".
Comment threadlinuxHelpers.cpp Outdated
The inner element of the LARGE_INTEGER union is a struct, so populate
its contens with {{0}} instead of {0,}, since it is a struct initialization.
@ckane

Copy link
Copy Markdown
ContributorAuthor

Kevin Sheldrake (@kesheldr) I just did an ammended commit to use your suggestion (sort of). The value {{0}} is accepted by the compiler to resolve -Wmissing-braces but simply providing {0} is not acceptable. The comma appears to be unnecessary though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for revisiting this. I guess one set of curly brackets for the struct and another for the union.

Sign up for freeto 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

@ckane@kesheldr