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

Replace atoi and atol with strtol (most files). #1224

Merged
merged 1 commit into from
Sep 25, 2022

Conversation

pghvlaans
Copy link
Contributor

Descriptions

  • Pursuant to the comment by @su8 in Linux: show the CPU scaling governor with $cpugovernor #1223, replace most of the remaining instances of atoi and all three instances of atol with strtol to prevent undefined behavior.
  • Testing revealed no changes in existing behavior.
  • I tested all of the atoi-using variables I could in patched and unpatched conky, and none of them appeared to show changed behavior. I haven't been able to test anything related to i8k.cc, ibm.cc, nvidia.cc (don't have the hardware) or openbsd.cc (haven't managed to build conky). To be extra-safe, I've left those files out of the commit, but modified versions can be found in a separate branch called "untested-atoi." If I should push those as well, just let me know!
  • Screenshots: There would be a lot of screenshots. I can probably get those arranged by sometime next week if necessary.

Licenses

  • No new files.

@netlify
Copy link

netlify bot commented Sep 25, 2022

Deploy Preview for lambent-marshmallow-4057de failed.

Name Link
🔨 Latest commit 199c601
🔍 Latest deploy log https://app.netlify.com/sites/lambent-marshmallow-4057de/deploys/633045da7bdb3d0008e8858f

@brndnmtthws brndnmtthws merged commit fc8d778 into brndnmtthws:main Sep 25, 2022
@pghvlaans pghvlaans deleted the remove-atoi branch September 26, 2022 09:41
@pghvlaans
Copy link
Contributor Author

Just for reference, there are a few remaining instances of atoi in those files that I couldn't test properly:

  • i8k.cc:96
  • ibm.cc:289, 295
  • openbsd.cc:486, 487, 491
  • nvidia.cc:431

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