aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/ripemd.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-10-15 19:36:22 -0400
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-10-18 15:17:58 -0400
commit07d4fe3a871f3ea2f3e475bc84c3e85102ec75ba (patch)
tree331d7f2f5ecbf93ab6818a736bca9b28ff0ba96d /libavutil/ripemd.c
parent94f7c97e05737c2856bb08e2172b012a56568bdc (diff)
downloadffmpeg-07d4fe3a871f3ea2f3e475bc84c3e85102ec75ba.tar.gz
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 <rsbultje@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavutil/ripemd.c')
-rw-r--r--libavutil/ripemd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/ripemd.c b/libavutil/ripemd.c
index 00848605ec..d247fb4fc7 100644
--- a/libavutil/ripemd.c
+++ b/libavutil/ripemd.c
@@ -504,7 +504,7 @@ av_cold int av_ripemd_init(AVRIPEMD *ctx, int bits)
ctx->transform = ripemd320_transform;
break;
default:
- return -1;
+ return AVERROR(EINVAL);
}
ctx->count = 0;
return 0;