[FFmpeg-devel] [PATCH] avformat/utils: fix logic error in ff_mkdir_p

Peter Ross pross at xvid.org
Sun Feb 13 02:28:06 EET 2022


On Tue, Jan 25, 2022 at 06:30:03PM +1100, Peter Ross wrote:
> Fix ticket# 9605
> 
> Signed-off-by: Peter Ross <pross at xvid.org>
> ---
>  libavformat/utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index e643821fc9..1164cebe68 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -1135,7 +1135,7 @@ int ff_mkdir_p(const char *path)
>          }
>      }
>  
> -    if ((*(pos - 1) != '/') || (*(pos - 1) != '\\')) {
> +    if ((*(pos - 1) != '/') && (*(pos - 1) != '\\')) {
>          ret = mkdir(temp, 0755);
>      }
>  
> -- 
> 2.34.1
> 
> -- Peter
> (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)

i will apply in a couple of days if no one objects.
this closes ticket# 9605 (-Wlogical-op)

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220213/729ac6b4/attachment.sig>


More information about the ffmpeg-devel mailing list