This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / crypto / tea.c
index bf94329..03c23cb 100644 (file)
@@ -31,8 +31,8 @@
 #define XTEA_ROUNDS            32
 #define XTEA_DELTA             0x9e3779b9
 
-#define u32_in(x) le32_to_cpu(*(const u32 *)(x))
-#define u32_out(to, from) (*(u32 *)(to) = cpu_to_le32(from))
+#define u32_in(x) le32_to_cpu(*(const __le32 *)(x))
+#define u32_out(to, from) (*(__le32 *)(to) = cpu_to_le32(from))
 
 struct tea_ctx {
        u32 KEY[4];
@@ -154,7 +154,7 @@ static void xtea_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
 
        while (sum != limit) {
                y += (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum&3]; 
-               sum += TEA_DELTA;
+               sum += XTEA_DELTA;
                z += (y << 4 ^ y >> 5) + (y ^ sum) + ctx->KEY[sum>>11 &3]; 
        }