Skip to content

Commit 8248854

Browse files
josuahkartben
authored andcommitted
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 585ee76 commit 8248854

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

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

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

0 commit comments

Comments
 (0)