diff options
author | Manfred Spraul <manfred@colorfullife.com> | 2005-06-23 03:10:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-23 12:45:30 -0400 |
commit | b78755abcdf1d7667c51580a3783e16e981ed926 (patch) | |
tree | 7627ff8c029411b304575d892d4caccefa3904bd | |
parent | 0030cbf06c669b65e124414af51b5010fc53b760 (diff) |
[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>
-rw-r--r-- | ipc/sem.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1054,7 +1054,7 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops, | |||
1054 | struct sembuf fast_sops[SEMOPM_FAST]; | 1054 | struct sembuf fast_sops[SEMOPM_FAST]; |
1055 | struct sembuf* sops = fast_sops, *sop; | 1055 | struct sembuf* sops = fast_sops, *sop; |
1056 | struct sem_undo *un; | 1056 | struct sem_undo *un; |
1057 | int undos = 0, decrease = 0, alter = 0, max; | 1057 | int undos = 0, alter = 0, max; |
1058 | struct sem_queue queue; | 1058 | struct sem_queue queue; |
1059 | unsigned long jiffies_left = 0; | 1059 | unsigned long jiffies_left = 0; |
1060 | 1060 | ||
@@ -1089,13 +1089,10 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops, | |||
1089 | if (sop->sem_num >= max) | 1089 | if (sop->sem_num >= max) |
1090 | max = sop->sem_num; | 1090 | max = sop->sem_num; |
1091 | if (sop->sem_flg & SEM_UNDO) | 1091 | if (sop->sem_flg & SEM_UNDO) |
1092 | undos++; | 1092 | undos = 1; |
1093 | if (sop->sem_op < 0) | 1093 | if (sop->sem_op != 0) |
1094 | decrease = 1; | ||
1095 | if (sop->sem_op > 0) | ||
1096 | alter = 1; | 1094 | alter = 1; |
1097 | } | 1095 | } |
1098 | alter |= decrease; | ||
1099 | 1096 | ||
1100 | retry_undos: | 1097 | retry_undos: |
1101 | if (undos) { | 1098 | if (undos) { |