CVS: libraries/commandline checksum.c,1.1,1.2

Chris Liechti <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/libraries/commandline
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31740/libraries/commandline

Modified Files:
	checksum.c 
Log Message:
- checksum logged wrong address range
- fix header file/missing include

Index: checksum.c
===================================================================
RCS file: /cvsroot/mspgcc/libraries/commandline/checksum.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- checksum.c	22 Aug 2005 11:25:26 -0000	1.1
+++ checksum.c	4 Apr 2006 23:20:55 -0000	1.2
@@ -5,7 +5,7 @@
 
 int command_checksum(int argc, char *argv[]) {
     unsigned int address;
-    unsigned int length = 160;
+    unsigned int length = 256;
     if (argc < 2) {
         printf("USAGE: %s address [size]\n", argv[0]);
         return 1;
@@ -16,7 +16,7 @@
     }
     printf("Checksum over 0x%04x-0x%04x is 0x%04x\n", 
         address,
-        address+length,
+        address+length-1,
         checksum_xor((void *)address, length)
     );
     return 0;



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.