Quoth Chris Kuethe at 2008-04-18 10:59...
> int
> oncore_checksum(char *buf, int len){
>       unsigned char a, b;
>       int i;
> 
>       a = buf[len-3];
>       b = '\0';
>       for(i = 2; i < len - 3; i++)
>               b ^= buf[i];
>       if (a == b)
>               return 0;
>       return 1;
> }

'Scuse me for being something of a C newbie, but does that not return 
either a 1 or a 0, but not the checksum?

Otherwise, I can follow the logic.  Thanks.


Cheers

M


-- 
Matthew Smith
Smiffytech - Technology Consulting & Web Application Development
Business: http://www.smiffytech.com/
Personal: http://www.smiffysplace.com/
LinkedIn: http://www.linkedin.com/in/smiffy

_______________________________________________
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Reply via email to