git: 9front

Download patch

ref: 2875ba6105bdd0e37bd827e1c96870f75ea8e85d
parent: 3975f1a956bf1270803893de6e7a2e308c53a89a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Jan 1 00:16:41 EST 2014

kernel: remove error label in pgrpnote() arround postnote

postnote does not raise error, so the error label is not
neccesary.

--- a/sys/src/9/port/pgrp.c
+++ b/sys/src/9/port/pgrp.c
@@ -24,20 +24,13 @@
 	memmove(buf, a, n);
 	buf[n] = 0;
 	p = proctab(0);
-	ep = p+conf.nproc;
-	for(; p < ep; p++) {
+	for(ep = p+conf.nproc; p < ep; p++) {
 		if(p->state == Dead)
 			continue;
 		if(up != p && p->noteid == noteid && p->kp == 0) {
 			qlock(&p->debug);
-			if(p->pid == 0 || p->noteid != noteid){
-				qunlock(&p->debug);
-				continue;
-			}
-			if(!waserror()) {
+			if(p->pid != 0 && p->noteid == noteid)
 				postnote(p, 0, buf, flag);
-				poperror();
-			}
 			qunlock(&p->debug);
 		}
 	}
--