From 01004d01cd427c0b11686777f00077055234c397 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Fri, 30 Jan 2009 21:41:40 +0100 Subject: [PATCH] get rid of the return value variable --- rsb-crc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/rsb-crc.c b/rsb-crc.c index 719d682..a2aa826 100644 --- a/rsb-crc.c +++ b/rsb-crc.c @@ -116,7 +116,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) { - int r8_ret = 1; unsigned int r4_len; unsigned int r5_crc; unsigned int file_crc; @@ -129,15 +128,13 @@ unsigned int rsb_crc2(unsigned char *r0_buf, unsigned int r1_buflen, unsigned in if (r1_buflen < r4_len) return 3; /* image to small */ - r8_ret = 4; - r5_crc = ~rsb_crc(~0x0, r0_buf, r4_len); *crc_out = r5_crc; file_crc = *((unsigned int*)(r0_buf + r4_len)); - if (file_crc == r5_crc) - r8_ret = 0; + if (file_crc != r5_crc) + return 4; - return r8_ret; + return 0; } -- 2.39.2