[PATCH] Remove unneeded code in sys_getpriority

From: Rabin Vincent
Date: Sat Feb 02 2008 - 22:04:52 EST


This check is not required because the condition is always true.

Signed-off-by: Rabin Vincent <rabin@xxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/