]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: fix operator precedence
authorShenghou Ma <minux@golang.org>
Sat, 16 Aug 2014 04:04:15 +0000 (14:04 +1000)
committerDave Cheney <dave@cheney.net>
Sat, 16 Aug 2014 04:04:15 +0000 (14:04 +1000)
LGTM=rsc
R=gobot, dave
CC=golang-codereviews, iant, rsc
https://golang.org/cl/114420043

src/cmd/ld/data.c

index c0dc3d05f20f282f843deadcddb7eceb1c6d3113..1919123b49d079c1cc29b8e512e271e9ff3a3f5e 100644 (file)
@@ -145,7 +145,7 @@ relocsym(LSym *s)
                        diag("%s: invalid relocation %d+%d not in [%d,%d)", s->name, off, siz, 0, s->np);
                        continue;
                }
-               if(r->sym != S && (r->sym->type & SMASK == 0 || r->sym->type & SMASK == SXREF)) {
+               if(r->sym != S && ((r->sym->type & SMASK) == 0 || (r->sym->type & SMASK) == SXREF)) {
                        diag("%s: not defined", r->sym->name);
                        continue;
                }