diff mbox series

[FFmpeg-devel,06/10] lavu/slicethread: return ENOSYS rather than EINVAL in the dummy func

Message ID 20210808172941.18238-6-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/10] ffmpeg: reset the dict iterator before use | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Anton Khirnov Aug. 8, 2021, 5:29 p.m. UTC
EINVAL is the wrong error code here, since the arguments passed to the
function are valid. The error is that the function is not implemented in
the build, which corresponds to ENOSYS.
---
 libavutil/slicethread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Rheinhardt Aug. 8, 2021, 5:41 p.m. UTC | #1
Anton Khirnov:
> EINVAL is the wrong error code here, since the arguments passed to the
> function are valid. The error is that the function is not implemented in
> the build, which corresponds to ENOSYS.
> ---
>  libavutil/slicethread.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavutil/slicethread.c b/libavutil/slicethread.c
> index f928a5cf00..867ce32238 100644
> --- a/libavutil/slicethread.c
> +++ b/libavutil/slicethread.c
> @@ -240,7 +240,7 @@ int avpriv_slicethread_create(AVSliceThread **pctx, void *priv,
>                                int nb_threads)
>  {
>      *pctx = NULL;
> -    return AVERROR(EINVAL);
> +    return AVERROR(ENOSYS);
>  }
>  
>  void avpriv_slicethread_execute(AVSliceThread *ctx, int nb_jobs, int execute_main)
> 
LGTM.

- Andreas
diff mbox series

Patch

diff --git a/libavutil/slicethread.c b/libavutil/slicethread.c
index f928a5cf00..867ce32238 100644
--- a/libavutil/slicethread.c
+++ b/libavutil/slicethread.c
@@ -240,7 +240,7 @@  int avpriv_slicethread_create(AVSliceThread **pctx, void *priv,
                               int nb_threads)
 {
     *pctx = NULL;
-    return AVERROR(EINVAL);
+    return AVERROR(ENOSYS);
 }
 
 void avpriv_slicethread_execute(AVSliceThread *ctx, int nb_jobs, int execute_main)