diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-16 02:36:22 +0300 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-18 22:17:58 +0300 |
commit | 07d4fe3a871f3ea2f3e475bc84c3e85102ec75ba (patch) | |
tree | 331d7f2f5ecbf93ab6818a736bca9b28ff0ba96d /libavutil/camellia.c | |
parent | 94f7c97e05737c2856bb08e2172b012a56568bdc (diff) |
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/camellia.c')
-rw-r--r-- | libavutil/camellia.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/camellia.c b/libavutil/camellia.c index 483eed22f0..f21ca12604 100644 --- a/libavutil/camellia.c +++ b/libavutil/camellia.c @@ -354,7 +354,7 @@ av_cold int av_camellia_init(AVCAMELLIA *cs, const uint8_t *key, int key_bits) uint64_t Kl[2], Kr[2], Ka[2], Kb[2]; uint64_t D1, D2; if (key_bits != 128 && key_bits != 192 && key_bits != 256) - return -1; + return AVERROR(EINVAL); memset(Kb, 0, sizeof(Kb)); memset(Kr, 0, sizeof(Kr)); cs->key_bits = key_bits; |