diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-12-14 11:22:36 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-12-14 11:22:36 +0000 |
commit | dbee4c4fa256f0121a21448798d618560a96f5fe (patch) | |
tree | 6893022fe61779e3b4faadbbf1ae024acc3e58ec /lib/libc/hash/rmd160.c | |
parent | 1fb5cf17feb1796f43e7973090f1e3404cbbb890 (diff) |
alignment fixes (e.g sparc 64); from Daniel Lucq; ok millert, henning
Diffstat (limited to 'lib/libc/hash/rmd160.c')
-rw-r--r-- | lib/libc/hash/rmd160.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/hash/rmd160.c b/lib/libc/hash/rmd160.c index a8c6a409611..f1d6cf72fab 100644 --- a/lib/libc/hash/rmd160.c +++ b/lib/libc/hash/rmd160.c @@ -32,7 +32,7 @@ #include <rmd160.h> #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: rmd160.c,v 1.12 2002/12/23 04:33:31 millert Exp $"; +static char rcsid[] = "$OpenBSD: rmd160.c,v 1.13 2003/12/14 11:22:35 markus Exp $"; #endif /* LIBC_SCCS and not lint */ #define PUT_64BIT_LE(cp, value) do { \ @@ -167,7 +167,11 @@ RMD160Transform(u_int32_t state[5], const u_char block[64]) int i; for (i = 0; i < 16; i++) - x[i] = swap32(*(u_int32_t*)(block+i*4)); + x[i] = (u_int32_t)( + (u_int32_t)(block[i*4 + 0]) | + (u_int32_t)(block[i*4 + 1]) << 8 | + (u_int32_t)(block[i*4 + 2]) << 16 | + (u_int32_t)(block[i*4 + 3]) << 24); #endif a = state[0]; |