
4 Nov
2012
4 Nov
'12
1:32 a.m.
Dear Simon Glass,
In message 1351979121-3769-2-git-send-email-sjg@chromium.org you wrote:
From: Han Shen shenhan@google.com
Fixed by replacing pointer casting with memcpy.
Signed-off-by: Simon Glass sjg@chromium.org
lib/md5.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/lib/md5.c b/lib/md5.c index 2ae4a06..9791e59 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -153,8 +153,7 @@ MD5Final(unsigned char digest[16], struct MD5Context *ctx) byteReverse(ctx->in, 14);
/* Append length in bits and transform */
- ctx->in32[14] = ctx->bits[0];
- ctx->in32[15] = ctx->bits[1];
- memcpy(ctx->in + 14 * sizeof(__u32), ctx->bits, 2 * sizeof(__u32));
This makes the code actually unreadable. Please add at least a comment what this is doing.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Of course there's no reason for it, it's just our policy.