mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2025-03-27 05:55:30 +01:00
rtl_fm: fix typo that caused warning
Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
parent
f7f02836c4
commit
de978c3b3a
@ -403,13 +403,12 @@ void full_demod(unsigned char *buf, uint32_t len, struct fm_state *fm)
|
|||||||
|
|
||||||
static void rtlsdr_callback(unsigned char *buf, uint32_t len, void *ctx)
|
static void rtlsdr_callback(unsigned char *buf, uint32_t len, void *ctx)
|
||||||
{
|
{
|
||||||
struct fm_state *fm2;
|
struct fm_state *fm2 = ctx;
|
||||||
int dr_val;
|
int dr_val;
|
||||||
if (do_exit) {
|
if (do_exit) {
|
||||||
return;}
|
return;}
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
return;}
|
return;}
|
||||||
fm2 = (struct fm_struct*)(ctx); // warning?
|
|
||||||
/* single threaded uses 25% less CPU? */
|
/* single threaded uses 25% less CPU? */
|
||||||
/* full_demod(buf, len, fm2); */
|
/* full_demod(buf, len, fm2); */
|
||||||
memcpy(fm2->buf, buf, len);
|
memcpy(fm2->buf, buf, len);
|
||||||
@ -421,9 +420,7 @@ static void rtlsdr_callback(unsigned char *buf, uint32_t len, void *ctx)
|
|||||||
|
|
||||||
static void *demod_thread_fn(void *arg)
|
static void *demod_thread_fn(void *arg)
|
||||||
{
|
{
|
||||||
struct fm_state *fm2;
|
struct fm_state *fm2 = arg;
|
||||||
int r = 0;
|
|
||||||
fm2 = (struct fm_struct*)(arg); // warning?
|
|
||||||
while (!do_exit) {
|
while (!do_exit) {
|
||||||
sem_wait(&data_ready);
|
sem_wait(&data_ready);
|
||||||
full_demod(fm2->buf, fm2->buf_len, fm2);
|
full_demod(fm2->buf, fm2->buf_len, fm2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user