[FFmpeg-cvslog] lavu/opt: Use "&&" instead of "*" in boolean expression.
Carl Eugen Hoyos
git at videolan.org
Mon Oct 9 00:16:21 EEST 2017
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Fri May 5 01:30:19 2017 +0200| [cd01b3cbcf3bc738dd9714fa760f6a8fec0b39d2] | committer: Carl Eugen Hoyos
lavu/opt: Use "&&" instead of "*" in boolean expression.
Fixes the following warning:
libavutil/opt.c:101:47: warning: '*' in boolean context, suggest '&&' instead
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd01b3cbcf3bc738dd9714fa760f6a8fec0b39d2
---
libavutil/opt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 6f87078926..df88663e3f 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -98,7 +98,7 @@ static int write_number(void *obj, const AVOption *o, void *dst, double num, int
{
if (o->type != AV_OPT_TYPE_FLAGS &&
(!den || o->max * den < num * intnum || o->min * den > num * intnum)) {
- num = den ? num * intnum / den : (num * intnum ? INFINITY : NAN);
+ num = den ? num * intnum / den : (num && intnum ? INFINITY : NAN);
av_log(obj, AV_LOG_ERROR, "Value %f for parameter '%s' out of range [%g - %g]\n",
num, o->name, o->min, o->max);
return AVERROR(ERANGE);
More information about the ffmpeg-cvslog
mailing list