cURL / Mailing Lists / curl-library / Single Mail

curl-library

ROTATE_LEFT macro in md5.c file

From: vick <vijayx_at_gmail.com>
Date: Wed, 27 Jan 2010 16:51:23 +0530

I was browsing and came across this snippet:-

#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))

maybe rather than using "32" above, it might make more sense to use sizeof
(int) or something like that which is machine independent and therefore less
prone to cause bugs on unusual cpu architectures? Of course, i am not in a
position to change/verify this myself or submit a commit.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-27