Commit dfc3e523 authored by Ian Lance Taylor's avatar Ian Lance Taylor

Use make instead of new to allocate a channel.

R=r
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=22452
CL=22455
parent 316d377a
......@@ -24,7 +24,7 @@ func Server(op *BinOp, service chan *Request) {
}
func StartServer(op *BinOp) chan *Request {
req := new(chan *Request);
req := make(chan *Request);
go Server(op, req);
return req;
}
......@@ -37,7 +37,7 @@ func main() {
req := &reqs[i];
req.a = i;
req.b = i + N;
req.replyc = new(chan int);
req.replyc = make(chan int);
adder <- req;
}
for i := N-1; i >= 0; i-- { // doesn't matter what order
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment