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

Changed several functions to be bool-correct #3726

Merged
merged 1 commit into from
Jul 5, 2019

Conversation

olehermanse
Copy link
Member

@olehermanse olehermanse commented Jul 3, 2019

This fixes almost all remaining alerts for bool
correctness in return values. The remaining cases are
non-trivial, and warrant their own investigation and
commits.

Also made some smaller style changes in surrounding code.
(Assertions, formatting, parentheses, comments).

Reported by LGTM:
https://lgtm.com/rules/1508604166004/

Merge together:
#3726
https://github.com/cfengine/enterprise/pull/528

@olehermanse olehermanse requested review from vpodzime and karlhto July 3, 2019 20:41
@olehermanse
Copy link
Member Author

@cf-bottom jenkins with exotics

Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

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

Looks good to me otherwise.

cf-agent/nfs.c Outdated Show resolved Hide resolved
cf-agent/vercmp.c Outdated Show resolved Hide resolved
This fixes almost all remaining alerts for bool
correctness in return values. The remaining cases are
non-trivial, and warrant their own investigation and
commits.

Also made some smaller style changes in surrounding code.
(Assertions, formatting, parentheses, comments).

Reported by LGTM:
https://lgtm.com/rules/1508604166004/

Changelog: None
Ticket: None
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
@cfengine cfengine deleted a comment from lgtm-com bot Jul 4, 2019
@cfengine cfengine deleted a comment from lgtm-com bot Jul 4, 2019
@cfengine cfengine deleted a comment from cf-bottom Jul 4, 2019
@cf-bottom
Copy link

Alright, I triggered a build:

Build Status

(with exotics)

Jenkins: https://ci.cfengine.com/job/pr-pipeline/2307/

Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-2307/

@olehermanse olehermanse requested a review from vpodzime July 4, 2019 10:34
@lgtm-com
Copy link

lgtm-com bot commented Jul 4, 2019

This pull request introduces 4 alerts and fixes 123 when merging 34c6dd3 into 3c4d046 - view on LGTM.com

new alerts:

  • 4 for FIXME comment

fixed alerts:

  • 123 for Boolean type mismatch between function type and return value

Copy link
Contributor

@karlhto karlhto left a comment

Choose a reason for hiding this comment

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

Looks good otherwise. :)

cf-agent/cf_sql.c Show resolved Hide resolved
@olehermanse olehermanse added the lgtm Fixes for issues found by LGTM code analysis label Jul 4, 2019
@olehermanse olehermanse requested a review from karlhto July 4, 2019 12:09
Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@vpodzime vpodzime merged commit 651a99a into cfengine:master Jul 5, 2019
@olehermanse olehermanse deleted the lgtm branch July 5, 2019 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Fixes for issues found by LGTM code analysis
Development

Successfully merging this pull request may close these issues.

4 participants