aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libosmo-fl2k.c6
-rw-r--r--src/rds_mod.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libosmo-fl2k.c b/src/libosmo-fl2k.c
index afc4d4f..7e1a008 100644
--- a/src/libosmo-fl2k.c
+++ b/src/libosmo-fl2k.c
@@ -250,9 +250,9 @@ int fl2k_set_sample_rate(fl2k_dev_t *dev, uint32_t target_freq)
error = sample_clock - (double)target_freq;
/* Keep closest match */
- if (fabsf(error) < last_error) {
+ if (fabs(error) < last_error) {
result_reg = reg;
- last_error = fabsf(error);
+ last_error = fabs(error);
}
}
}
@@ -262,7 +262,7 @@ int fl2k_set_sample_rate(fl2k_dev_t *dev, uint32_t target_freq)
error = sample_clock - (double)target_freq;
dev->rate = sample_clock;
- if (fabsf(error) > 1)
+ if (fabs(error) > 1)
fprintf(stderr, "Requested sample rate %d not possible, using"
" %f, error is %f\n", target_freq, sample_clock, error);
diff --git a/src/rds_mod.c b/src/rds_mod.c
index 8e31b0d..687aa65 100644
--- a/src/rds_mod.c
+++ b/src/rds_mod.c
@@ -38,8 +38,8 @@ extern double waveform_biphase[576];
struct {
uint16_t pi;
int ta;
- char ps[PS_LENGTH];
- char rt[RT_LENGTH];
+ char ps[PS_LENGTH+1];
+ char rt[RT_LENGTH+1];
} rds_params = { 0 };
/* The RDS error-detection code generator polynomial is