[FFmpeg-devel] [PATCH 6/6] avutil/des: use EINVAL instead of -1 for the return code of av_des_init()

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sun Oct 18 01:40:56 CEST 2015


On Sat, Oct 17, 2015 at 7:39 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>  libavutil/des.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavutil/des.c b/libavutil/des.c
> index c97158a..3ccbf89 100644
> --- a/libavutil/des.c
> +++ b/libavutil/des.c
> @@ -292,7 +292,7 @@ AVDES *av_des_alloc(void)
>
>  int av_des_init(AVDES *d, const uint8_t *key, int key_bits, av_unused int decrypt) {
>      if (key_bits != 64 && key_bits != 192)
> -        return -1;
> +        return AVERROR(EINVAL);
>      d->triple_des = key_bits > 64;
>      gen_roundkeys(d->round_keys[0], AV_RB64(key));
>      if (d->triple_des) {
> --
> 2.6.1
>

I can squash these if people prefer, or leave as is.


More information about the ffmpeg-devel mailing list