summaryrefslogtreecommitdiff
path: root/dds.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-11-09 11:41:11 -0500
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-11-09 11:41:11 -0500
commit16d6dea985b85ff596e98d4dc7f15f341ad6966b (patch)
tree445a695bc6c58849b0600af16bdd44ffe79f932e /dds.c
parent65c7900768799338b143a024c64b32661a38200e (diff)
cppcheck fixes
Diffstat (limited to 'dds.c')
-rw-r--r--dds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dds.c b/dds.c
index 8002d78..fe6a35d 100644
--- a/dds.c
+++ b/dds.c
@@ -36,7 +36,7 @@ void dds_setamplitude(float millivolts)
char scalebuff[64];
if (read(scalefd, scalebuff, sizeof(scalebuff))) {
- sscanf(scalebuff, "%f\n", &scale);
+ sscanf(scalebuff, "%10f\n", &scale); // the string should be ?.??? but round up the width a bit just in case
}
if (scale == 0) {