The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] Remove unneeded code in sys_getpriority
@ 2008-02-03  3:04 Rabin Vincent
  2008-02-03  9:54 ` Frank Seidel
  0 siblings, 1 reply; 4+ messages in thread
From: Rabin Vincent @ 2008-02-03  3:04 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel

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

Signed-off-by: Rabin Vincent <rabin@rab.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


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

end of thread, other threads:[~2008-02-03 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-03  3:04 [PATCH] Remove unneeded code in sys_getpriority Rabin Vincent
2008-02-03  9:54 ` Frank Seidel
2008-02-03 17:58   ` Rabin Vincent
2008-02-03 18:10     ` Frank Seidel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox