]> Cypherpunks repositories - gostls13.git/commitdiff
Removing dead tests from chan.c
authorBill Neubauer <wcn@golang.org>
Tue, 18 Aug 2009 05:21:48 +0000 (22:21 -0700)
committerBill Neubauer <wcn@golang.org>
Tue, 18 Aug 2009 05:21:48 +0000 (22:21 -0700)
Since pres != nil was already checked and the routine sets *pres to false
and returns, the subsequent tests are unneeded.

R=rsc
APPROVED=rsc
DELTA=4  (0 added, 4 deleted, 0 changed)
OCL=33439
CL=33441

src/pkg/runtime/chan.c

index daab4642c404a70d0f5418c667ea81c36ca2f5a4..64a52d48a935267190bb1b9b0cfbc7881c379058 100644 (file)
@@ -223,8 +223,6 @@ loop:
                goto loop;
        freesg(c, sg);
        unlock(&chanlock);
-       if(pres != nil)
-               *pres = true;
        return;
 
 asynch:
@@ -325,8 +323,6 @@ loop:
        c->elemalg->copy(c->elemsize, ep, sg->elem);
        freesg(c, sg);
        unlock(&chanlock);
-       if(pres != nil)
-               *pres = true;
        return;
 
 asynch: