[PATCH] compositor-tty: Fix ioctl error handling

Kristian Høgsberg krh at bitplanet.net
Mon Dec 5 06:50:09 PST 2011


On Fri, Dec 2, 2011 at 10:16 AM, David Herrmann
<dh.herrmann at googlemail.com> wrote:
> (!x < 0) is always false and doesn't make sense here. Looks like a typo so
> remove the negation.

Definitely a typo, thanks for the fix.
Kristian

> Signed-off-by: David Herrmann <dh.herrmann at googlemail.com>
> ---
>  compositor/tty.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/compositor/tty.c b/compositor/tty.c
> index 5ed921c..ce2dd56 100644
> --- a/compositor/tty.c
> +++ b/compositor/tty.c
> @@ -145,7 +145,7 @@ tty_create(struct wlsc_compositor *compositor, tty_vt_func_t vt_func,
>        mode.mode = VT_PROCESS;
>        mode.relsig = SIGUSR1;
>        mode.acqsig = SIGUSR2;
> -       if (!ioctl(tty->fd, VT_SETMODE, &mode) < 0) {
> +       if (ioctl(tty->fd, VT_SETMODE, &mode) < 0) {
>                fprintf(stderr, "failed to take control of vt handling\n");
>                return NULL;
>        }
> --
> 1.7.7.4
>


More information about the wayland-devel mailing list