Skip to contentSkip to conversation

rio: Add missing parentheses

PATCH New Roel Kluin 1 participant 1 message Feb 17, 2009 Char and misc drivers

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 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

---

drivers/char/rio/rio_linux.c +1 -1
index 2e8a6ee..ce81da5 100644
@@ -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)