summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2014-09-15 20:52:58 -0400
committerwm4 <wm4@nowhere>2014-09-16 17:33:47 +0200
commitb41ece5ad4d902f742e939e8c9670d9d4688cb1c (patch)
treeb19c5d5880eff046256ff507fdb86635f874da52 /player/command.c
parent5fd8660f5ff4107b7cea05623eaae505fed6b6e5 (diff)
downloadmpv-b41ece5ad4d902f742e939e8c9670d9d4688cb1c.tar.bz2
mpv-b41ece5ad4d902f742e939e8c9670d9d4688cb1c.tar.xz
command: avoid a double -> int cast
Just check against zero directly. Changes behavior, but that should be ok. Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index 4879115d86..6c881bcfca 100644
--- a/player/command.c
+++ b/player/command.c
@@ -352,7 +352,7 @@ static int mp_property_length(void *ctx, struct m_property *prop,
MPContext *mpctx = ctx;
double len;
- if (!(int) (len = get_time_length(mpctx)))
+ if ((len = get_time_length(mpctx)) <= 0)
return M_PROPERTY_UNAVAILABLE;
return property_time(action, arg, len);