#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 | ------------------------------------+------------------------------------ Description changed by cehoyos:
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) != '\\')) { }}} -- -- Ticket URL: <https://trac.ffmpeg.org/ticket/6752#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker _______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org http://ffmpeg.org/mailman/listinfo/ffmpeg-trac