From 58ea238fb2c5ddf69e1b2d598ccf58b6a9fe8270 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 31 Oct 2021 12:20:45 +0100 Subject: [PATCH] Remove unnecessary variable Test directly if a record filename is provided, without an intermediate boolean variable. --- app/src/scrcpy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index 2efc043a..c7033a26 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -295,7 +295,6 @@ scrcpy(struct scrcpy_options *options) { bool controller_started = false; bool screen_initialized = false; - bool record = !!options->record_filename; struct server_params params = { .serial = options->serial, .log_level = options->log_level, @@ -358,7 +357,7 @@ scrcpy(struct scrcpy_options *options) { } struct recorder *rec = NULL; - if (record) { + if (options->record_filename) { if (!recorder_init(&s->recorder, options->record_filename, options->record_format,