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

Address some warnings and code style #14

Merged
merged 5 commits into from
Aug 15, 2024
Merged

Address some warnings and code style #14

merged 5 commits into from
Aug 15, 2024

Conversation

jimklimov
Copy link
Contributor

@jimklimov jimklimov commented Aug 13, 2024

Roughly follow NUT coding style guide for portability:

  • Declare variables on top
  • TAB after type before names in declarations
  • Spaces around maths operators
  • Space after if/for before parentheses
  • Avoid trailing whitespaces

Started with checking for getcwd() and fchdir() failures, as current compilers warned :D

After reading issue #2, reproduced some issues that were fatal for build on a MacOS VM, fixed them too (better choice of headers).

Poked as part of PoC for NUT client readings to be seen in a filesystem: networkupstools/nut#2592

…tribute warn_unused_result)

Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
* Declare variables on top
* TAB after type before names in declarations
* Spaces around maths operators
* Space after if/for before parentheses

Signed-off-by: Jim Klimov <[email protected]>
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