From cd01b3cbcf3bc738dd9714fa760f6a8fec0b39d2 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 5 May 2017 01:30:19 +0200 Subject: [PATCH] lavu/opt: Use "&&" instead of "*" in boolean expression. Fixes the following warning: libavutil/opt.c:101:47: warning: '*' in boolean context, suggest '&&' instead --- 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);