[mutter] Fix incorrect 'is' in gen_default_modes
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Fix incorrect 'is' in gen_default_modes
- Date: Mon, 10 Feb 2020 19:52:57 +0000 (UTC)
commit 5b1620475e5ae5062f5b5100114bd04e84223ea2
Author: Sergio Costas <raster rastersoft com>
Date: Mon Feb 10 20:32:07 2020 +0100
Fix incorrect 'is' in gen_default_modes
During compilation, gen_default_modes.py shows two warnings that
say that a comparison is using 'is' instead of '=='.
This patch fixes this bug.
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/985
src/backends/native/gen-default-modes.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/gen-default-modes.py b/src/backends/native/gen-default-modes.py
index aeccc0d28..fed514d45 100755
--- a/src/backends/native/gen-default-modes.py
+++ b/src/backends/native/gen-default-modes.py
@@ -62,9 +62,9 @@ output_lines = [
def sync_flags(hsync, vsync):
flags = "DRM_MODE_FLAG_"
- flags += "NHSYNC" if hsync[0] is '-' else "PHSYNC"
+ flags += "NHSYNC" if hsync[0] == '-' else "PHSYNC"
flags += " | DRM_MODE_FLAG_"
- flags += "NVSYNC" if vsync[0] is '-' else "PVSYNC"
+ flags += "NVSYNC" if vsync[0] == '-' else "PVSYNC"
return flags
def drm_mode_info_from_modeline(line):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]