[FFmpeg-devel] [PATCH 1/3] avutil/cast5: use EINVAL instead of -1 for the return code of av_cast5_init()

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sun Oct 18 21:23:05 CEST 2015


On Sat, Oct 17, 2015 at 8:06 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>  libavutil/cast5.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavutil/cast5.c b/libavutil/cast5.c
> index 98aa19d..a47697b 100644
> --- a/libavutil/cast5.c
> +++ b/libavutil/cast5.c
> @@ -459,7 +459,7 @@ av_cold int av_cast5_init(AVCAST5* cs, const uint8_t *key, int key_bits)
>      int i;
>      uint32_t p[4], q[4];
>      if (key_bits % 8 || key_bits < 40 || key_bits > 128)
> -        return -1;
> +        return AVERROR(EINVAL);
>      memset(newKey, 0, sizeof(newKey));
>      memcpy(newKey, key, key_bits >> 3);
>
> --
> 2.6.1
>

pushed


More information about the ffmpeg-devel mailing list