diff options
author | Martin Pool <mbp@sourcefrog.net> | 2004-09-10 01:48:58 +0000 |
---|---|---|
committer | Martin Pool <mbp@sourcefrog.net> | 2004-09-10 01:48:58 +0000 |
commit | 314000cdb3f946d2711148a45efea760c65733e1 (patch) | |
tree | 6bf2879bec607eff1c79dafc8a1f12594ff84328 | |
parent | 2d8f28eebeffcb5c813a4864e9c476ad8d4cabc9 (diff) | |
download | librsync-314000cdb3f946d2711148a45efea760c65733e1.tar.gz |
Add prototype for rs_mdfour_block, and make it static.
On i386 rs_mdfour_block can be an inline-able static function rather
than a macro, just for consistency.
-rw-r--r-- | mdfour.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -70,6 +70,11 @@ static unsigned char PADDING[64] = { }; +static void +rs_mdfour_block(rs_mdfour_t *md, void const *p); + + + /** * Update an MD4 accumulator from a 64-byte chunk. * @@ -216,7 +221,8 @@ copy64( /* @out@ */ uint32_t * M, unsigned char const *in) * Accumulate a block, making appropriate conversions for bigendian * machines. */ -void rs_mdfour_block(rs_mdfour_t *md, void const *p) +static void +rs_mdfour_block(rs_mdfour_t *md, void const *p) { uint32_t M[16]; @@ -230,14 +236,19 @@ void rs_mdfour_block(rs_mdfour_t *md, void const *p) # ifdef __i386__ /* If we are on an IA-32 machine, we can process directly. */ -#define rs_mdfour_block(md,p) rs_mdfour64(md,p) +static void +rs_mdfour_block(rs_mdfour_t *md, void const *p) +{ + rs_mdfour64(md,p); +} # else /* We are little-endian, but not on i386 and therefore may not be able * to do unaligned access safely/quickly. So copy the input block to * an aligned buffer first. */ -void rs_mdfour_block(rs_mdfour_t *md, void const *p) +static void +rs_mdfour_block(rs_mdfour_t *md, void const *p) { uint32_t M[16]; |