anchao commented on code in PR #17640:
URL: https://github.com/apache/nuttx/pull/17640#discussion_r2643230215


##########
sched/wdog/wd_start.c:
##########
@@ -265,62 +258,63 @@ int wd_start_abstick(FAR struct wdog_s *wdog, clock_t 
ticks,
                      wdentry_t wdentry, wdparm_t arg)
 {
   irqstate_t flags;
-  bool reassess = false;
+  bool       reassess = false;
+  int        ret      = -EINVAL;
 
   /* Verify the wdog and setup parameters */
 
-  if (wdog == NULL || wdentry == NULL)
+  if (wdog != NULL && wdentry != NULL)

Review Comment:
   Fixing this clause is not advisable. For some architectures and compilers, 
local branch jumps actually boost performance related to code cache, 
instruction prefetching, and branch prediction. We should prioritize practical 
optimizations over adherence to inflexible coding rules.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to