From f1ba1ef77f9536910caac8fff2c3793491d23459 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Fri, 16 Nov 2018 19:55:09 +0100 Subject: vo_x11: fix return value in resize() error paths Returning -1 in a function with return type bool is the same as returning true. In the error paths, false should be returned to indicate that something went wrong. --- video/out/vo_x11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index 13b22d1bfb..a27fb9b213 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -226,7 +226,7 @@ static bool resize(struct vo *vo) for (int i = 0; i < 2; i++) { if (!getMyXImage(p, i)) - return -1; + return false; } const struct fmt_entry *fmte = mp_to_x_fmt; @@ -241,7 +241,7 @@ static bool resize(struct vo *vo) } if (!fmte->mpfmt) { MP_ERR(vo, "X server image format not supported, use another VO.\n"); - return -1; + return false; } mp_sws_set_from_cmdline(p->sws, vo->global); -- cgit v1.2.3