diff options
author | James Almer <jamrial@gmail.com> | 2016-05-11 18:16:56 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-05-11 19:47:35 -0300 |
commit | 7d8e19a5c4d2c7a95907d791ac090a0e5aad7c6a (patch) | |
tree | d7d2b3fe75dbbaead14f99ae8409b67f8b321f14 /libavutil/hash-test.c | |
parent | f693184557e43f12d70733d91bacec6d15e53704 (diff) |
avutil: make crypto testprogs include headers only
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/hash-test.c')
-rw-r--r-- | libavutil/hash-test.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavutil/hash-test.c b/libavutil/hash-test.c index fe14cc3b1c..bb7edf592b 100644 --- a/libavutil/hash-test.c +++ b/libavutil/hash-test.c @@ -18,7 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "hash.c" +#include <stdio.h> +#include <string.h> + +#include "hash.h" #define SRC_BUF_SIZE 64 #define DST_BUF_SIZE (AV_HASH_MAX_SIZE * 8) @@ -26,10 +29,14 @@ int main(void) { struct AVHashContext *ctx = NULL; - int i, j; + int i, j, numhashes = 0; static const uint8_t src[SRC_BUF_SIZE] = { 0 }; uint8_t dst[DST_BUF_SIZE]; - for (i = 0; i < NUM_HASHES; i++) { + + while (av_hash_names(numhashes)) + numhashes++; + + for (i = 0; i < numhashes; i++) { if (av_hash_alloc(&ctx, av_hash_names(i)) < 0) return 1; |