[PATCH weston 03/11] tty: Correctly check if the opening of the file descriptor failed

Rob Bradford robert.bradford at intel.com
Fri Jul 26 08:29:37 PDT 2013


From: Rob Bradford <rob at linux.intel.com>

---
 src/tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tty.c b/src/tty.c
index 2324f6c..38079a4 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -161,7 +161,7 @@ tty_create(struct weston_compositor *compositor, tty_vt_func_t vt_func,
 		tty->fd = try_open_vt(tty);
 	}
 
-	if (tty->fd <= 0) {
+	if (tty->fd < 0) {
 		weston_log("failed to open tty: %m\n");
 		free(tty);
 		return NULL;
-- 
1.8.3.1



More information about the wayland-devel mailing list