tty: Correctly check if the opening of the file descriptor failed

dev
Rob Bradford 11 years ago committed by Kristian Høgsberg
parent 12a2ff3482
commit 5c89710166
  1. 2
      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;

Loading…
Cancel
Save