jlaitine commented on code in PR #16394: URL: https://github.com/apache/nuttx/pull/16394#discussion_r2094903725
########## sched/wdog/wd_start.c: ########## @@ -406,15 +406,12 @@ int wd_start_abstick(FAR struct wdog_s *wdog, clock_t ticks, * ****************************************************************************/ -int wd_start(FAR struct wdog_s *wdog, sclock_t delay, +int wd_start(FAR struct wdog_s *wdog, clock_t delay, wdentry_t wdentry, wdparm_t arg) { - /* Verify the wdog and setup parameters */ + /* Ensure delay is within the range the wdog can handle. */ - if (delay < 0) - { - return -EINVAL; - } + delay = delay < WDOG_MAX_DELAY ? delay : WDOG_MAX_DELAY; Review Comment: Would it be better to just return error if delay > WDOG_MAX_DELAY? If someone actually tries to set longer delays, just silently setting it to MAX will cause a hidden error for the user -- 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