Re: [PATCH -next 1/3] media: dvb-frontends: drx39xyj: Remove an unnecessary ternary operator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 04, 2023 at 11:13:21AM +0800, Ruan Jinjie wrote:
> There is a ternary operator, the true or false judgement of which
> is unnecessary in C language semantics.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@xxxxxxxxxx>
> ---
>  drivers/media/dvb-frontends/drx39xyj/drxj.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c
> index 68f4e8b5a0ab..e54e61c3518a 100644
> --- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
> +++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
> @@ -4779,7 +4779,7 @@ set_frequency(struct drx_demod_instance *demod,
>  	bool image_to_select;
>  	s32 fm_frequency_shift = 0;
>  
> -	rf_mirror = (ext_attr->mirror == DRX_MIRROR_YES) ? true : false;
> +	rf_mirror = ext_attr->mirror == DRX_MIRROR_YES;
>  	tuner_mirror = demod->my_common_attr->mirror_freq_spect ? false : true;

Maybe also do:

-	tuner_mirror = demod->my_common_attr->mirror_freq_spect ? false : true;
+	tuner_mirror = !demod->my_common_attr->mirror_freq_spect;

?

Best regards
Uwe

>  	/*
>  	   Program frequency shifter

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux