aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/Incomplete/StandaloneProgrammer/Lib
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-02-28 20:40:24 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-02-28 20:40:24 +0000
commitbb85d083a7899890d0c14502078f6fa60a09d5df (patch)
tree64639b9495a86414aa0cc92917145b41a5f1562e /Projects/Incomplete/StandaloneProgrammer/Lib
parentb762780343dd505f7bfe5673cbcffb0b938d7064 (diff)
downloadlufa-bb85d083a7899890d0c14502078f6fa60a09d5df.tar.gz
lufa-bb85d083a7899890d0c14502078f6fa60a09d5df.tar.bz2
lufa-bb85d083a7899890d0c14502078f6fa60a09d5df.zip
Fix warnings and errors found by the new cppcheck provided static code analysis.
Diffstat (limited to 'Projects/Incomplete/StandaloneProgrammer/Lib')
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Lib/ProgrammerConfig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/ProgrammerConfig.c b/Projects/Incomplete/StandaloneProgrammer/Lib/ProgrammerConfig.c
index 6a8419d35..917523669 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Lib/ProgrammerConfig.c
+++ b/Projects/Incomplete/StandaloneProgrammer/Lib/ProgrammerConfig.c
@@ -40,7 +40,7 @@ struct
bool ProgrammerConfig_ProcessConfiguration(void)
{
- memset(&ProgrammerConfig, sizeof(ProgrammerConfig), 0x00);
+ memset(&ProgrammerConfig, 0x00, sizeof(ProgrammerConfig));
if (!(pf_open("CONF.txt") == FR_OK))
{
@@ -61,8 +61,8 @@ bool ProgrammerConfig_ProcessConfiguration(void)
&ProgrammerConfig.SigBytes[1],
&ProgrammerConfig.SigBytes[2],
&ProgrammerConfig.SigBytes[3]);
-
- sscanf(CurrentLine, "SPEED = %lu", &ProgrammerConfig.ProgrammingSpeed);
+
+ sscanf(CurrentLine, "SPEED = %08lu", &ProgrammerConfig.ProgrammingSpeed);
}
} while (CurrentLine);