aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKyle Keen <keenerd@gmail.com>2012-12-10 17:19:07 -0500
committerSteve Markgraf <steve@steve-m.de>2012-12-10 23:26:57 +0100
commit71b254a238763d28698cdd9c7c6e31d1a0e84bb6 (patch)
treeb472857e800e2e6456a6848b8c20eeecb33b1d2a /src
parent562fd7e8e3200fa876312e58427b3c9a7575d3fa (diff)
rtl_fm: non-gnu str functions
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src')
-rw-r--r--src/rtl_fm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rtl_fm.c b/src/rtl_fm.c
index 81a4071..45f8e06 100644
--- a/src/rtl_fm.c
+++ b/src/rtl_fm.c
@@ -576,7 +576,8 @@ double atofs(char* f)
{
char* chop;
double suff = 1.0;
- chop = strndup(f, strlen(f)-1);
+ chop = malloc((strlen(f)+1)*sizeof(char));
+ strncpy(chop, f, strlen(f)-1);
switch (f[strlen(f)-1]) {
case 'G':
suff *= 1e3;