ipc: remove unreachable code in sem.c
PATCH 1/1 ipc: remove unreachable code in sem.c
This line is unreachable, remove it.
Signed-off-by WANG Cong <[email protected]>
---
ipc/sem.c +0 -1
@@ -652,7 +652,6 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,default :return -EINVAL ; } -return err; out_unlock:sem_unlock (sma);return err;
Quoted 10 lines · On Tue, 1 Dec 2009 01:57:09 -0500 Amerigo Wang <[email protected]> wrote:
This line is unreachable, remove it.
Signed-off-by WANG Cong <[email protected]>---
ipc/sem.c +0
-0
ipc/sem.c static int semctl_nolock(struct ipc_namespace *ns, int semid, · line 657
Quoted 7 lines
ipc/sem.c +0
-1@@ -652,7 +652,6 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,default :return -EINVAL ; } -return err; out_unlock:sem_unlock (sma);return err;
If we're going to do that then there's no point in initialising `err':
ipc/sem.c renamed from ipc/sem.c~ipc-remove-unreachable-code-in-semc-fix +1 -1
@@ -624,7 +624,7 @@ static unsigned long copy_semid_to_user(static int semctl_nolock (struct ipc_namespace *ns,int semid,int cmd,int version,union semun arg) { -int err = -EINVAL ; +int err;struct sem_array *sma;switch (cmd) {
_
you should have noticed this!
Quoted 37 lines · Andrew Morton
Quoted 10 lines · On Tue, 1 Dec 2009 01:57:09 -0500 Amerigo Wang <[email protected]> wrote:
This line is unreachable, remove it.
Signed-off-by WANG Cong <[email protected]>---
ipc/sem.c +0
-0ipc/sem.c static int semctl_nolock(struct ipc_namespace *ns, int semid, · line 657
Quoted 7 lines
ipc/sem.c +0
-1@@ -652,7 +652,6 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,default :return -EINVAL ; } -return err; out_unlock:sem_unlock (sma);return err;If we're going to do that then there's no point in initialising `err':
ipc/sem.c renamed from ipc/sem.c~ipc-remove-unreachable-code-in-semc-fix +1
-1@@ -624,7 +624,7 @@ static unsigned long copy_semid_to_user(static int semctl_nolock (struct ipc_namespace *ns,int semid,int cmd,int version,union semun arg) { -int err = -EINVAL ; +int err;struct sem_array *sma;switch (cmd) {_
Quoted 1 line
you should have noticed this!
Oh, I didn't realize that. Thank you!