* [PATCH] rio: Add missing parentheses
@ 2009-02-17 12:52 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-02-17 12:52 UTC (permalink / raw)
To: Alan Cox; +Cc: Andrew Morton, lkml
#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@gmail.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)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-17 12:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-17 12:52 [PATCH] rio: Add missing parentheses Roel Kluin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.