overflow problems, which I try to avoid, start only if its bigger than int.
So I had assumed that in my case I'm alright. Do you see any change needed that I can't see ?
---
Maybe a good idea would had been to go by platform or architecture and use some macros to do the check only if it's really needed. What do you think of it ? How would you implement it ?
If strtol reliably sets errno to ERANGE, you're fine (you'll get a compiler warning for "if (aLong < INT_MIN || aLong > INT_MAX) {" though, because it can never be true.)
I have no idea what the cross-platform reliability of strtol() is, regarding errno. Should be fine, I hope.
I added now a "/** * * */" separator to make it even more clear.
I don't know, but I like separating things like that, I think it's handy for cases like now that setting the errno was kind of mixed with vars initialization.
Badgermole is a library for creating an SSH App server for OTP (One-Time Passwords) for authenticating requests to HTTP server.
This library exists because usernames and passwords are unsafe in this day and age, while other OTP mechanics have become complicated.
While coding tends to be rigid, software engineering strives to be flexible.
This flexibility is crucial because software engineering acts as the intermediary layer between code and the dynamic real world.
In the real world, adaptability is key, and flexible software is more likely to align with the ever-changing demands, unlike rigid counterparts that may quickly become outdated.
So I had assumed that in my case I'm alright. Do you see any change needed that I can't see ?
---
Maybe a good idea would had been to go by platform or architecture and use some macros to do the check only if it's really needed. What do you think of it ? How would you implement it ?
You can make a pull request as well.