[FFmpeg-trac] #6752(avformat:closed): ffmpeg-3.4/libavformat/hlsenc.c:210: bad if statement ?
FFmpeg
trac at avcodec.org
Tue Nov 27 18:39:56 EET 2018
#6752: ffmpeg-3.4/libavformat/hlsenc.c:210: bad if statement ?
------------------------------------+------------------------------------
Reporter: dcb | Owner:
Type: defect | Status: closed
Priority: normal | Component: avformat
Version: git-master | Resolution: fixed
Keywords: hls | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Changes (by cehoyos):
* keywords: => hls
* status: new => closed
* version: unspecified => git-master
* resolution: => fixed
Old description:
> ffmpeg-3.4/libavformat/hlsenc.c:210]: (warning) Logical disjunction
> always evaluates to true: EXPR != '/' || EXPR != '\\'.
>
> Source code is
>
> if ((*(pos - 1) != '/') || (*(pos - 1) != '\\')) {
>
> Maybe better code
>
> if ((*(pos - 1) != '/') && (*(pos - 1) != '\\')) {
New description:
ffmpeg-3.4/libavformat/hlsenc.c:210]: (warning) Logical disjunction always
evaluates to true: EXPR != '/' || EXPR != '\\'.
Source code is
{{{
if ((*(pos - 1) != '/') || (*(pos - 1) != '\\')) {
}}}
Maybe better code
{{{
if ((*(pos - 1) != '/') && (*(pos - 1) != '\\')) {
}}}
--
Comment:
Fixed by Steven Liu in bb660800a55f5171f77316941afe2e62534ee72c
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6752#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list