adafruit / adafruit/Adafruit_IO_Arduino
Wrong logic for initializing _err_sub and _throttle_sub
- Dominant language
- C++
- Stars
- 222
- Forks
- 109
- PR merge metrics
- No merged PRs in 30d
Description
See this code fragment:
https://github.com/adafruit/Adafruit_IO_Arduino/blob/e2b69fdee825a432c29cf140fdb92ba3a4ea02f7/src/AdafruitIO.cpp#L154-L159
`_err_sub` is only initialized if it's non-NULL, which is the opposite of what I'd expect.
Same for `_throttle_sub`.
As an aside, this will never actually be executed, as both are initialized to `0`.
It doesn't look like this is the intended behavior of this code.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/AdafruitIO.cpp at lines 154-159 and inspect how _err_sub and _throttle_sub are initialized. Confirm the null checks match the intended initialization behavior, then verify the library still builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100