aboutsummaryrefslogtreecommitdiffstats
path: root/src/rtl_fm.c
diff options
context:
space:
mode:
authorSteve Markgraf <steve@steve-m.de>2012-07-17 21:20:41 +0200
committerSteve Markgraf <steve@steve-m.de>2012-07-17 21:20:41 +0200
commitde978c3b3a634e0df730c77a3023fb8967bd0e73 (patch)
treee9f43c8bd72ead7647d726cc81f3cb0ee13d2b25 /src/rtl_fm.c
parentf7f02836c4d47660060f8269fef42f6195034c7c (diff)
rtl_fm: fix typo that caused warning
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src/rtl_fm.c')
-rw-r--r--src/rtl_fm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/rtl_fm.c b/src/rtl_fm.c
index 4b789e8..0350d8b 100644
--- a/src/rtl_fm.c
+++ b/src/rtl_fm.c
@@ -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)
{
- struct fm_state *fm2;
+ struct fm_state *fm2 = ctx;
int dr_val;
if (do_exit) {
return;}
if (!ctx) {
return;}
- fm2 = (struct fm_struct*)(ctx); // warning?
/* single threaded uses 25% less CPU? */
/* full_demod(buf, len, fm2); */
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)
{
- struct fm_state *fm2;
- int r = 0;
- fm2 = (struct fm_struct*)(arg); // warning?
+ struct fm_state *fm2 = arg;
while (!do_exit) {
sem_wait(&data_ready);
full_demod(fm2->buf, fm2->buf_len, fm2);