hartmannathan commented on PR #8939: URL: https://github.com/apache/nuttx/pull/8939#issuecomment-1496209742
> > `SYS_DOWN` does not need `sync()`? > > `SYS_DOWN` will call `sync()` since it uses the same value as `SYS_RESTART`: > > ```c > #define SYS_RESTART SYS_DOWN > ``` > > But IMO, this hurts the maintenability of the project. What if someone changes this `define` in the future? > > Maybe it is better to change it to: > > ```c > if (action == SYS_POWER_OFF || action == SYS_DOWN || action == SYS_RESTART) > ``` > > so we don't depend on these two macros having the same value? +1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org