]> Cypherpunks repositories - gostls13.git/commitdiff
avoid memcpy(x, x),
authorRuss Cox <rsc@golang.org>
Sat, 31 Jan 2009 00:31:26 +0000 (16:31 -0800)
committerRuss Cox <rsc@golang.org>
Sat, 31 Jan 2009 00:31:26 +0000 (16:31 -0800)
which valgrind complains about.

R=ken
OCL=23990
CL=23990

src/cmd/gc/walk.c

index 24a3a39c27783f014def51f4f428f429b6115e23..6e959b8c7a62afee69a6f0ec758ec195ad80bc6a 100644 (file)
@@ -170,7 +170,7 @@ loop:
 void
 indir(Node *nl, Node *nr)
 {
-       if(nr != N)
+       if(nr != N && nl != nr)
                *nl = *nr;
 }