pw_software_update: Replace macro with function Reduce code size by moving some parts of the SET_ERROR() macro into a function. This saves 2 * 26 PW_CHECK() invocations by pushing those checks into shared code. More savings are possible by re-using the computed log slug, but that requires adding functionality to pw_log and will come later. Change-Id: I191077b3ce79b5578501222250f8620ec8b38b9d Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/70120 Commit-Queue: Yecheng Zhao <zyecheng@google.com> Reviewed-by: Keir Mierle <keir@google.com> Reviewed-by: Ewout van Bekkum <ewout@google.com> Reviewed-by: Wyatt Hepler <hepler@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/