From 07d4fe3a871f3ea2f3e475bc84c3e85102ec75ba Mon Sep 17 00:00:00 2001 From: Ganesh Ajjanagadde Date: Thu, 15 Oct 2015 19:36:22 -0400 Subject: avutil: use EINVAL instead of -1 for the return code of crypto related init functions These functions return an error typically when the key size is an incorrect number. AVERROR(EINVAL) is more specific than -1. Reviewed-by: Ronald S. Bultje Reviewed-by: Michael Niedermayer Signed-off-by: Ganesh Ajjanagadde --- libavutil/sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavutil/sha.c') diff --git a/libavutil/sha.c b/libavutil/sha.c index 9963043fa0..748bb9c558 100644 --- a/libavutil/sha.c +++ b/libavutil/sha.c @@ -305,7 +305,7 @@ av_cold int av_sha_init(AVSHA *ctx, int bits) ctx->transform = sha256_transform; break; default: - return -1; + return AVERROR(EINVAL); } ctx->count = 0; return 0; -- cgit v1.2.3