pijuice
driver uses status_set()
unidiomatically
#2436
Labels
GPIO
Drivers talking to devices (or their chips) over GPIO interface
raspberry
refactor/fightwarn
PR or issue proposal to improve code maintainability without functional changes, or to fix warnings
Milestone
The method is intended to set individual statuses and takes care of concatenating them into the ultimate
ups.status
string when flushed, so the logic should be:status_init()
status_set("TOKEN")
status_commit()
to finalize theups.status
In this driver I see "manual" preparation of a
status_buf[]
and then passing it tostatus_set()
, which is not idiomatic and can forfeit some sanity checks done in these methods.The text was updated successfully, but these errors were encountered: