[FFmpeg-cvslog] lavu/tests/des: rename crypt to crypt_ref

Clément Bœsch git at videolan.org
Fri Sep 8 19:52:29 EEST 2017


ffmpeg | branch: master | Clément Bœsch <cboesch at gopro.com> | Thu Sep  7 15:56:56 2017 +0200| [dc27df47ff99fb29ed36711a62efb78ee28dba97] | committer: Clément Bœsch

lavu/tests/des: rename crypt to crypt_ref

This will prevent a symbol clash with crypt(3) after unistd.h is
included.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc27df47ff99fb29ed36711a62efb78ee28dba97
---

 libavutil/tests/des.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavutil/tests/des.c b/libavutil/tests/des.c
index 309be29473..eac33d47d4 100644
--- a/libavutil/tests/des.c
+++ b/libavutil/tests/des.c
@@ -34,7 +34,7 @@ static uint64_t rand64(void)
 
 static const uint8_t test_key[] = { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 };
 static const DECLARE_ALIGNED(8, uint8_t, plain)[] = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 };
-static const DECLARE_ALIGNED(8, uint8_t, crypt)[] = { 0x4a, 0xb6, 0x5b, 0x3d, 0x4b, 0x06, 0x15, 0x18 };
+static const DECLARE_ALIGNED(8, uint8_t, crypt_ref)[] = { 0x4a, 0xb6, 0x5b, 0x3d, 0x4b, 0x06, 0x15, 0x18 };
 static DECLARE_ALIGNED(8, uint8_t, tmp)[8];
 static DECLARE_ALIGNED(8, uint8_t, large_buffer)[10002][8];
 static const uint8_t cbc_key[] = {
@@ -82,13 +82,13 @@ int main(void)
     key[0].word = AV_RB64(test_key);
     data.word   = AV_RB64(plain);
     gen_roundkeys(roundkeys, key[0].word);
-    if (des_encdec(data.word, roundkeys, 0) != AV_RB64(crypt)) {
+    if (des_encdec(data.word, roundkeys, 0) != AV_RB64(crypt_ref)) {
         printf("Test 1 failed\n");
         return 1;
     }
     av_des_init(&d, test_key, 64, 0);
     av_des_crypt(&d, tmp, plain, 1, NULL, 0);
-    if (memcmp(tmp, crypt, sizeof(crypt))) {
+    if (memcmp(tmp, crypt_ref, sizeof(crypt_ref))) {
         printf("Public API decryption failed\n");
         return 1;
     }



More information about the ffmpeg-cvslog mailing list