aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2017-05-05 01:30:19 +0200
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-10-08 23:15:53 +0200
commitcd01b3cbcf3bc738dd9714fa760f6a8fec0b39d2 (patch)
tree33f6a39769bb0d6edcffd6a7424b81bc159d4006
parentc2d155e11ee5ec732d471982f2dee43703bcd5a7 (diff)
downloadffmpeg-cd01b3cbcf3bc738dd9714fa760f6a8fec0b39d2.tar.gz
lavu/opt: Use "&&" instead of "*" in boolean expression.
Fixes the following warning: libavutil/opt.c:101:47: warning: '*' in boolean context, suggest '&&' instead
-rw-r--r--libavutil/opt.c2
1 files changed, 1 insertions, 1 deletions
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);