[<prev] [next>] [day] [month] [year] [list]
Message-ID: <499AB31C.9000200@gmail.com>
Date: Tue, 17 Feb 2009 13:52:44 +0100
From: Roel Kluin <roel.kluin@...il.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
CC: Andrew Morton <akpm@...ux-foundation.org>,
lkml <linux-kernel@...r.kernel.org>
Subject: [PATCH] rio: Add missing parentheses
#include <stdio.h>
int main(int argc, char* argv[])
{
printf ("%d\n", 1 + (1 == 0) ? 2 : 4);
return 0;
}
gcc test.c;a.out
2
I think this was intended? otherwise we could also do
return tty->index || (tty->driver == rio_driver) ? 0 : 256;
--------------------------->8-------------8<------------------------------
Add missing parentheses
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
index 2e8a6ee..ce81da5 100644
--- a/drivers/char/rio/rio_linux.c
+++ b/drivers/char/rio/rio_linux.c
@@ -333,7 +333,7 @@ void rio_copy_to_card(void *from, void __iomem *to, int len)
int rio_minor(struct tty_struct *tty)
{
- return tty->index + (tty->driver == rio_driver) ? 0 : 256;
+ return tty->index + ((tty->driver == rio_driver) ? 0 : 256);
}
static int rio_set_real_termios(void *ptr)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists