Removes unused functions.

This commit is contained in:
Andrea Mazzoleni 2011-05-04 19:54:05 +02:00
parent 5d91e37c9a
commit 83facb4329
3 changed files with 3 additions and 39 deletions

View file

@ -17,7 +17,7 @@ SnapRAID HISTORY
for SSE2 and MMX.
* Added support for multiple 'content' files. You can save extra copies to be
able to verify the checksums also if you lose all the 'content' files in the
parity drives.
parity disks.
* Added a filtering include logic, where anything not explicitely included
is excluded. For example, it allow to include only the files in a predefined
set of directories.

34
util.c
View file

@ -255,40 +255,6 @@ void* malloc_nofail_align(size_t size, void** freeptr)
return ptr;
}
void memxor(unsigned char* xor, const unsigned char* block, unsigned size)
{
while (size >= 16) {
uint32_t* xor32 = (uint32_t*)xor;
const uint32_t* block32 = (const uint32_t*)block;
xor32[0] ^= block32[0];
xor32[1] ^= block32[1];
xor32[2] ^= block32[2];
xor32[3] ^= block32[3];
xor += 16;
block += 16;
size -= 16;
}
while (size >= 4) {
uint32_t* xor32 = (uint32_t*)xor;
const uint32_t* block32 = (const uint32_t*)block;
xor32[0] ^= block32[0];
xor += 4;
block += 4;
size -= 4;
}
while (size != 0) {
xor[0] ^= block[0];
xor += 1;
block += 1;
size -= 1;
}
}
#if HAVE_LIBCRYPTO
#include <openssl/md5.h>
#else

6
util.h
View file

@ -116,10 +116,8 @@ void* malloc_nofail(size_t size);
*/
void* malloc_nofail_align(size_t size, void** freeptr);
/**
* Xor two memory blocks.
*/
void memxor(unsigned char* xor, const unsigned char* block, unsigned size);
/****************************************************************************/
/* hash */
/**
* Size of the hash.