All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel: arg2 is unsigned long which is never < 0
@ 2013-02-06  8:44 Chen Gang
  2013-02-06  8:56 ` Cyrill Gorcunov
  0 siblings, 1 reply; 8+ messages in thread
From: Chen Gang @ 2013-02-06  8:44 UTC (permalink / raw)
  To: akpm, keescook, serge.hallyn, gorcunov, ebiederm, linux-kernel


  arg2 will never < 0, for its type is 'unsigned long'

  so delete the waste code.


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 kernel/sys.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sys.c b/kernel/sys.c
index 24d1ef5..568b9ca 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2027,7 +2027,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
 			error = get_dumpable(me->mm);
 			break;
 		case PR_SET_DUMPABLE:
-			if (arg2 < 0 || arg2 > 1) {
+			if (arg2 > 1) {
 				error = -EINVAL;
 				break;
 			}
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-07  1:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06  8:44 [PATCH] kernel: arg2 is unsigned long which is never < 0 Chen Gang
2013-02-06  8:56 ` Cyrill Gorcunov
2013-02-06 10:36   ` Chen Gang
2013-02-06 15:24     ` Serge Hallyn
2013-02-07  1:54       ` Chen Gang
2013-02-06 15:35     ` Cyrill Gorcunov
2013-02-06 19:41     ` Kees Cook
2013-02-07  1:38       ` Chen Gang

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.