hcrypto: Don't use 'u' as a variable name
Some kernels #define u as a pointer to the current user structure. This causes problems when trying to use hcrypto's hash routines in those kernels, as they try to use 'u' as a variable name for a structure pointer. Change this variable name to avoid the conflict. Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:

committed by
Love Hornquist Astrand

parent
bd91f174b9
commit
bbc9176868
@@ -191,10 +191,10 @@ MD4_Update (struct md4 *m, const void *v, size_t len)
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
int i;
|
||||
uint32_t current[16];
|
||||
struct x32 *u = (struct x32*)m->save;
|
||||
struct x32 *us = (struct x32*)m->save;
|
||||
for(i = 0; i < 8; i++){
|
||||
current[2*i+0] = swap_uint32_t(u[i].a);
|
||||
current[2*i+1] = swap_uint32_t(u[i].b);
|
||||
current[2*i+0] = swap_uint32_t(us[i].a);
|
||||
current[2*i+1] = swap_uint32_t(us[i].b);
|
||||
}
|
||||
calc(m, current);
|
||||
#else
|
||||
|
@@ -215,10 +215,10 @@ MD5_Update (struct md5 *m, const void *v, size_t len)
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
int i;
|
||||
uint32_t current[16];
|
||||
struct x32 *u = (struct x32*)m->save;
|
||||
struct x32 *us = (struct x32*)m->save;
|
||||
for(i = 0; i < 8; i++){
|
||||
current[2*i+0] = swap_uint32_t(u[i].a);
|
||||
current[2*i+1] = swap_uint32_t(u[i].b);
|
||||
current[2*i+0] = swap_uint32_t(us[i].a);
|
||||
current[2*i+1] = swap_uint32_t(us[i].b);
|
||||
}
|
||||
calc(m, current);
|
||||
#else
|
||||
|
@@ -241,10 +241,10 @@ SHA1_Update (struct sha *m, const void *v, size_t len)
|
||||
#if !defined(WORDS_BIGENDIAN) || defined(_CRAY)
|
||||
int i;
|
||||
uint32_t current[16];
|
||||
struct x32 *u = (struct x32*)m->save;
|
||||
struct x32 *us = (struct x32*)m->save;
|
||||
for(i = 0; i < 8; i++){
|
||||
current[2*i+0] = swap_uint32_t(u[i].a);
|
||||
current[2*i+1] = swap_uint32_t(u[i].b);
|
||||
current[2*i+0] = swap_uint32_t(us[i].a);
|
||||
current[2*i+1] = swap_uint32_t(us[i].b);
|
||||
}
|
||||
calc(m, current);
|
||||
#else
|
||||
|
@@ -183,10 +183,10 @@ SHA256_Update (SHA256_CTX *m, const void *v, size_t len)
|
||||
#if !defined(WORDS_BIGENDIAN) || defined(_CRAY)
|
||||
int i;
|
||||
uint32_t current[16];
|
||||
struct x32 *u = (struct x32*)m->save;
|
||||
struct x32 *us = (struct x32*)m->save;
|
||||
for(i = 0; i < 8; i++){
|
||||
current[2*i+0] = swap_uint32_t(u[i].a);
|
||||
current[2*i+1] = swap_uint32_t(u[i].b);
|
||||
current[2*i+0] = swap_uint32_t(us[i].a);
|
||||
current[2*i+1] = swap_uint32_t(us[i].b);
|
||||
}
|
||||
calc(m, current);
|
||||
#else
|
||||
|
Reference in New Issue
Block a user