patch-2.1.120 linux/ipc/sem.c

Next file: linux/ipc/util.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.119/linux/ipc/sem.c linux/ipc/sem.c
@@ -466,10 +466,10 @@
 		if (ipcperms (ipcp, S_IRUGO))
 			goto out;
 		switch (cmd) {
-		case GETVAL : return curr->semval;
-		case GETPID : return curr->sempid;
-		case GETNCNT: return count_semncnt(sma,semnum);
-		case GETZCNT: return count_semzcnt(sma,semnum);
+		case GETVAL : err = curr->semval; goto out;
+		case GETPID : err = curr->sempid; goto out;
+		case GETNCNT: err = count_semncnt(sma,semnum); goto out;
+		case GETZCNT: err = count_semzcnt(sma,semnum); goto out;
 		case GETALL:
 			array = arg.array;
 			break;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov