avutil/camellia: use K[2] instead of *K in generate_round_keys()
authorGiorgio Vazzana <mywing81@gmail.com>
Fri, 2 Jan 2015 15:57:09 +0000 (16:57 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 2 Jan 2015 20:23:56 +0000 (21:23 +0100)
Additionally, change parameters order.

Signed-off-by: Giorgio Vazzana <mywing81@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/camellia.c

index 2e719be..15b63f3 100644 (file)
@@ -190,7 +190,7 @@ static const uint8_t vars[2][12] = {
     {3,1,2,3,0,2,1,3,0,1,2,0}
 };
 
-static void generate_round_keys(AVCAMELLIA* cs, uint64_t *Ka, uint64_t *Kb, uint64_t *Kl, uint64_t *Kr)
+static void generate_round_keys(AVCAMELLIA* cs, uint64_t Kl[2], uint64_t Kr[2], uint64_t Ka[2], uint64_t Kb[2])
 {
     int i;
     uint64_t *Kd[4], d[2];
@@ -374,7 +374,7 @@ av_cold int av_camellia_init(AVCAMELLIA* cs, const uint8_t *key, int key_bits)
         Kb[0] = D1;
         Kb[1] = D2;
     }
-    generate_round_keys(cs, Ka, Kb, Kl, Kr);
+    generate_round_keys(cs, Kl, Kr, Ka, Kb);
     return 0;
 }