diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2018-11-16 19:55:09 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2018-11-17 00:53:56 +0100 |
commit | f1ba1ef77f9536910caac8fff2c3793491d23459 (patch) | |
tree | afe1fd0037d7499da2539deedcf561c224fdea1e /video/out | |
parent | 2704625e3f90ce770685add724055092acb8d364 (diff) |
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.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/vo_x11.c | 4 |
1 files 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); |