mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2025-01-28 02:44:57 +01:00
librtlsdr: remove unneeded casting
Signed-off-by: Hoernchen <la@tfc-server.de>
This commit is contained in:
parent
e82a07e67a
commit
314683a51e
@ -861,7 +861,7 @@ int rtlsdr_get_tuner_gains(rtlsdr_dev_t *dev, int *gains)
|
||||
445, 480, 496 };
|
||||
const int unknown_gains[] = { 0 /* no gain values */ };
|
||||
|
||||
int *ptr = NULL;
|
||||
const int *ptr = NULL;
|
||||
int len = 0;
|
||||
|
||||
if (!dev)
|
||||
@ -869,22 +869,22 @@ int rtlsdr_get_tuner_gains(rtlsdr_dev_t *dev, int *gains)
|
||||
|
||||
switch (dev->tuner_type) {
|
||||
case RTLSDR_TUNER_E4000:
|
||||
ptr = (int *)e4k_gains; len = sizeof(e4k_gains);
|
||||
ptr = e4k_gains; len = sizeof(e4k_gains);
|
||||
break;
|
||||
case RTLSDR_TUNER_FC0012:
|
||||
ptr = (int *)fc0012_gains; len = sizeof(fc0012_gains);
|
||||
ptr = fc0012_gains; len = sizeof(fc0012_gains);
|
||||
break;
|
||||
case RTLSDR_TUNER_FC0013:
|
||||
ptr = (int *)fc0013_gains; len = sizeof(fc0013_gains);
|
||||
ptr = fc0013_gains; len = sizeof(fc0013_gains);
|
||||
break;
|
||||
case RTLSDR_TUNER_FC2580:
|
||||
ptr = (int *)fc2580_gains; len = sizeof(fc2580_gains);
|
||||
ptr = fc2580_gains; len = sizeof(fc2580_gains);
|
||||
break;
|
||||
case RTLSDR_TUNER_R820T:
|
||||
ptr = (int *)r820t_gains; len = sizeof(r820t_gains);
|
||||
ptr = r820t_gains; len = sizeof(r820t_gains);
|
||||
break;
|
||||
default:
|
||||
ptr = (int *)unknown_gains; len = sizeof(unknown_gains);
|
||||
ptr = unknown_gains; len = sizeof(unknown_gains);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user