]> cvs.zerfleddert.de Git - rsbs2/commitdiff
remove r5_crc variable
authorMichael Gernoth <michael@gernoth.net>
Sat, 31 Jan 2009 00:15:05 +0000 (01:15 +0100)
committerMichael Gernoth <michael@gernoth.net>
Sat, 31 Jan 2009 00:15:05 +0000 (01:15 +0100)
rsb-crc.c

index a2aa82623dfd1b54b14e4097d5281b79d46df264..8c8fbbeddbb7eeee8d296dca92d64fa210681fb7 100644 (file)
--- a/rsb-crc.c
+++ b/rsb-crc.c
@@ -117,7 +117,6 @@ unsigned int rsb_crc(unsigned int r11_crc, unsigned char *r10_buf, unsigned int
 
 unsigned int rsb_crc2(unsigned char *r0_buf, unsigned int r1_buflen, unsigned int r2_magic, unsigned int *crc_out) {
        unsigned int r4_len;
-       unsigned int r5_crc;
        unsigned int file_crc;
 
        r4_len = *(unsigned int*)(r0_buf + 0x20);
@@ -128,12 +127,11 @@ unsigned int rsb_crc2(unsigned char *r0_buf, unsigned int r1_buflen, unsigned in
        if (r1_buflen < r4_len)
                return 3; /* image to small */
        
-       r5_crc = ~rsb_crc(~0x0, r0_buf, r4_len);
-       *crc_out = r5_crc;
+       *crc_out = ~rsb_crc(~0x0, r0_buf, r4_len);
 
        file_crc = *((unsigned int*)(r0_buf + r4_len));
 
-       if (file_crc != r5_crc)
+       if (file_crc != *crc_out)
                return 4;
 
        return 0;
Impressum, Datenschutz