Skip to content

Commit 0d41a44

Browse files
committed
samples: drivers: video: capture: convert #ifdef into if()
Convert #ifdef CONFIG_TEST into if (IS_ENABLED(CONFIG_TEST)) to improve readability. Signed-off-by: Josuah Demangeon <me@josuah.net>
1 parent 33c4c86 commit 0d41a44

File tree

1 file changed

+4
-4
lines changed
  • samples/drivers/video/capture/src

1 file changed

+4
-4
lines changed

samples/drivers/video/capture/src/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ int main(void)
208208
video_set_ctrl(video_dev, &ctrl);
209209
}
210210

211-
#ifdef CONFIG_TEST
212-
ctrl.id = VIDEO_CID_TEST_PATTERN;
213-
video_set_ctrl(video_dev, &ctrl);
214-
#endif
211+
if (IS_ENABLED(CONFIG_TEST)) {
212+
ctrl.id = VIDEO_CID_TEST_PATTERN;
213+
video_set_ctrl(video_dev, &ctrl);
214+
}
215215

216216
#if DT_HAS_CHOSEN(zephyr_display)
217217
const struct device *const display_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_display));

0 commit comments

Comments
 (0)