Skip to content

Commit c09d7b1

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 a0d7bc5 commit c09d7b1

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
@@ -205,10 +205,10 @@ int main(void)
205205
video_set_ctrl(video_dev, &ctrl);
206206
}
207207

208-
#ifdef CONFIG_TEST
209-
ctrl.id = VIDEO_CID_TEST_PATTERN;
210-
video_set_ctrl(video_dev, &ctrl);
211-
#endif
208+
if (IS_ENABLED(CONFIG_TEST)) {
209+
ctrl.id = VIDEO_CID_TEST_PATTERN;
210+
video_set_ctrl(video_dev, &ctrl);
211+
}
212212

213213
#if DT_HAS_CHOSEN(zephyr_display)
214214
const struct device *const display_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_display));

0 commit comments

Comments
 (0)