This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 3013a1fcdedd9b7d27f5bc6068e8505b1d17f5c5 Author: Darryl Ring <[email protected]> AuthorDate: Fri Oct 23 13:55:13 2026 -0700 drivers/timer/capture: Fix code formatting Touching this file surfaced some code style issues. Signed-off-by: Darryl Ring <[email protected]> --- drivers/timers/capture.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/timers/capture.c b/drivers/timers/capture.c index 9a4ab2cc918..bb3f3379d76 100644 --- a/drivers/timers/capture.c +++ b/drivers/timers/capture.c @@ -351,7 +351,9 @@ static int cap_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case CAPIOC_DUTYCYCLE: { FAR uint8_t *ptr = (FAR uint8_t *)((uintptr_t)arg); + DEBUGASSERT(ptr); + for (i = 0; i < upper->nchan; i++) { DEBUGASSERT(lower[i]->ops->getduty != NULL); @@ -371,7 +373,9 @@ static int cap_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case CAPIOC_FREQUENCY: { FAR uint32_t *ptr = (FAR uint32_t *)((uintptr_t)arg); + DEBUGASSERT(ptr); + for (i = 0; i < upper->nchan; i++) { DEBUGASSERT(lower[i]->ops->getfreq != NULL); @@ -391,6 +395,7 @@ static int cap_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case CAPIOC_EDGES: { FAR uint32_t *ptr = (FAR uint32_t *)((uintptr_t)arg); + DEBUGASSERT(ptr); /* Counting edges is optional for the lower half */ @@ -421,7 +426,9 @@ static int cap_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct cap_all_s *ptr = (FAR struct cap_all_s *)((uintptr_t)arg); + DEBUGASSERT(ptr); + for (i = 0 ; i < upper->nchan ; i++) { ret = lower[i]->ops->getduty(lower[i], &ptr[i].duty); @@ -532,6 +539,7 @@ static int cap_ioctl(FAR struct file *filep, int cmd, unsigned long arg) FAR unsigned long int *ptr = (FAR unsigned long int *)arg; + for (i = 0; i < upper->nchan; i++) { ret = lower[i]->ops->ioctl(lower[i], cmd,
