[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080203030429.GB7459@ubuntu>
Date: Sun, 3 Feb 2008 08:34:29 +0530
From: Rabin Vincent <rabin@....in>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Linux Kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] Remove unneeded code in sys_getpriority
This check is not required because the condition is always true.
Signed-off-by: Rabin Vincent <rabin@....in>
---
kernel/sys.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/kernel/sys.c b/kernel/sys.c
index d1fe71e..a001974 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -212,11 +212,8 @@ asmlinkage long sys_getpriority(int which, int who)
p = find_task_by_vpid(who);
else
p = current;
- if (p) {
- niceval = 20 - task_nice(p);
- if (niceval > retval)
- retval = niceval;
- }
+ if (p)
+ retval = 20 - task_nice(p);
break;
case PRIO_PGRP:
if (who)
--
1.5.3.8
--
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