summaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
authorManfred Spraul <manfred@colorfullife.com>2005-06-23 00:10:06 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 09:45:30 -0700
commitb78755abcdf1d7667c51580a3783e16e981ed926 (patch)
tree7627ff8c029411b304575d892d4caccefa3904bd /ipc/sem.c
parent0030cbf06c669b65e124414af51b5010fc53b760 (diff)
downloadlinux-b78755abcdf1d7667c51580a3783e16e981ed926.tar.gz
linux-b78755abcdf1d7667c51580a3783e16e981ed926.tar.bz2
linux-b78755abcdf1d7667c51580a3783e16e981ed926.zip
[PATCH] ipcsem: remove superflous decrease variable from sys_semtimedop
Patrick noticed that the initial scan of the semaphore operations logs decrease and increase operations seperately, but then both cases are or'ed together and decrease is never used. The attached patch removes the decrease parameter - it shrinks sys_semtimedop() by 56 bytes. Signed-Of-By: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 5ad7ac0ed60d..7e8a25c82ef3 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1054,7 +1054,7 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops,
struct sembuf fast_sops[SEMOPM_FAST];
struct sembuf* sops = fast_sops, *sop;
struct sem_undo *un;
- int undos = 0, decrease = 0, alter = 0, max;
+ int undos = 0, alter = 0, max;
struct sem_queue queue;
unsigned long jiffies_left = 0;
@@ -1089,13 +1089,10 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops,
if (sop->sem_num >= max)
max = sop->sem_num;
if (sop->sem_flg & SEM_UNDO)
- undos++;
- if (sop->sem_op < 0)
- decrease = 1;
- if (sop->sem_op > 0)
+ undos = 1;
+ if (sop->sem_op != 0)
alter = 1;
}
- alter |= decrease;
retry_undos:
if (undos) {