aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/dgn3500sum.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/firmware-utils/src/dgn3500sum.c')
-rw-r--r--tools/firmware-utils/src/dgn3500sum.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/firmware-utils/src/dgn3500sum.c b/tools/firmware-utils/src/dgn3500sum.c
index 00a0c5f837..eb80e6c01b 100644
--- a/tools/firmware-utils/src/dgn3500sum.c
+++ b/tools/firmware-utils/src/dgn3500sum.c
@@ -103,7 +103,7 @@ int main(int argc, char** argv)
unsigned long start, i;
char *endptr, *buffer, *p;
int count; // size of file in bytes
- unsigned short sum, sum1;
+ unsigned short sum = 0, sum1 = 0;
char sumbuf[9];
if(argc < 3) {
@@ -117,7 +117,7 @@ int main(int argc, char** argv)
printf("ERROR: File not writeable!\n");
return 1;
}
- if(argc = 4)
+ if(argc == 4)
{
printf("%s: PID type: %s\n", argv[0], argv[3]);
if(strcmp(argv[3], "DE")==0)
@@ -147,7 +147,6 @@ int main(int argc, char** argv)
start = strtol(argv[2], &endptr, 16);
p = buffer+start;
- sum1 = 0;
for(i = 0; i < count - start; i++)
{
sum1 += p[i];