aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRussell King <rmk+lkml@arm.linux.org.uk>2006-11-10 15:27:53 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-13 10:40:42 -0500
commitd8b295f29091310d746509bb6d5828aaf4907a18 (patch)
treedb49c0b071d744e7687723c5ae45cf1b02640b97 /include/linux
parente40c67597eac7a0b0e676867517b01a5a57f7b4b (diff)
[PATCH] Fix missing parens in set_personality()
If you call set_personality() with an expression such as: set_personality(foo ? PERS_FOO1 : PERS_FOO2); then this evaluates to: ((current->personality == foo ? PERS_FOO1 : PERS_FOO2) ? ... which is obviously not the intended result. Add the missing parents to ensure this gets evaluated as expected: ((current->personality == (foo ? PERS_FOO1 : PERS_FOO2)) ? ... Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/personality.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/personality.h b/include/linux/personality.h
index bf4cf2080e5c..012cd558189b 100644
--- a/include/linux/personality.h
+++ b/include/linux/personality.h
@@ -114,7 +114,7 @@ struct exec_domain {
114 * Change personality of the currently running process. 114 * Change personality of the currently running process.
115 */ 115 */
116#define set_personality(pers) \ 116#define set_personality(pers) \
117 ((current->personality == pers) ? 0 : __set_personality(pers)) 117 ((current->personality == (pers)) ? 0 : __set_personality(pers))
118 118
119#endif /* __KERNEL__ */ 119#endif /* __KERNEL__ */
120 120