]> Git Repo - qemu.git/commitdiff
crypto: rename OUT to out in xts test to avoid clash on MinGW
authorDaniel P. Berrange <[email protected]>
Tue, 14 Jun 2016 15:40:18 +0000 (16:40 +0100)
committerDaniel P. Berrange <[email protected]>
Mon, 4 Jul 2016 09:46:59 +0000 (10:46 +0100)
On MinGW one of the system headers already has "OUT" defined
which causes a compile failure of the test suite. Rename the
test suite var to 'out' to avoid this clash

Signed-off-by: Daniel P. Berrange <[email protected]>
tests/test-crypto-xts.c

index 7f68b063cd4a42b15ef1a24202e132053deb3a48..1f1412c45af8003a969b72ed5a61868a3000e572 100644 (file)
@@ -340,7 +340,7 @@ static void test_xts_aes_decrypt(const void *ctx,
 static void test_xts(const void *opaque)
 {
     const QCryptoXTSTestData *data = opaque;
-    unsigned char OUT[512], Torg[16], T[16];
+    unsigned char out[512], Torg[16], T[16];
     uint64_t seq;
     int j;
     unsigned long len;
@@ -371,38 +371,38 @@ static void test_xts(const void *opaque)
             xts_encrypt(&aesdata, &aestweak,
                         test_xts_aes_encrypt,
                         test_xts_aes_decrypt,
-                        T, data->PTLEN, OUT, data->PTX);
+                        T, data->PTLEN, out, data->PTX);
         } else {
             xts_encrypt(&aesdata, &aestweak,
                         test_xts_aes_encrypt,
                         test_xts_aes_decrypt,
-                        T, len, OUT, data->PTX);
+                        T, len, out, data->PTX);
             xts_encrypt(&aesdata, &aestweak,
                         test_xts_aes_encrypt,
                         test_xts_aes_decrypt,
-                        T, len, &OUT[len], &data->PTX[len]);
+                        T, len, &out[len], &data->PTX[len]);
         }
 
-        g_assert(memcmp(OUT, data->CTX, data->PTLEN) == 0);
+        g_assert(memcmp(out, data->CTX, data->PTLEN) == 0);
 
         memcpy(T, Torg, sizeof(T));
         if (j == 0) {
             xts_decrypt(&aesdata, &aestweak,
                         test_xts_aes_encrypt,
                         test_xts_aes_decrypt,
-                        T, data->PTLEN, OUT, data->CTX);
+                        T, data->PTLEN, out, data->CTX);
         } else {
             xts_decrypt(&aesdata, &aestweak,
                         test_xts_aes_encrypt,
                         test_xts_aes_decrypt,
-                        T, len, OUT, data->CTX);
+                        T, len, out, data->CTX);
             xts_decrypt(&aesdata, &aestweak,
                         test_xts_aes_encrypt,
                         test_xts_aes_decrypt,
-                        T, len, &OUT[len], &data->CTX[len]);
+                        T, len, &out[len], &data->CTX[len]);
         }
 
-        g_assert(memcmp(OUT, data->PTX, data->PTLEN) == 0);
+        g_assert(memcmp(out, data->PTX, data->PTLEN) == 0);
     }
 }
 
This page took 0.031476 seconds and 4 git commands to generate.