commit | 2f281eb24ef256a2d3bb9fc1a7ef964d82b40182 | [log] [tgz] |
---|---|---|
author | Ian Lance Taylor <iant@golang.org> | Fri Mar 12 19:17:09 2021 -0800 |
committer | Ian Lance Taylor <iant@golang.org> | Sat Mar 13 04:05:58 2021 +0000 |
tree | 4c3da8e8c10fbc43a241212582c91446efafebaa | |
parent | bf35249a7c752836741b1cab43a312f87916fcb0 [diff] |
misc/cgo/testcarchive: don't use == for string equality in C code Backport of https://golang.org/cl/300993. For https://gcc.gnu.org/PR99553 Change-Id: I42727f024af36103435646e58aca013ace6e1581 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/301458 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
diff --git a/libgo/misc/cgo/testcarchive/testdata/main_unix.c b/libgo/misc/cgo/testcarchive/testdata/main_unix.c index b23ac1c..bd00f9d 100644 --- a/libgo/misc/cgo/testcarchive/testdata/main_unix.c +++ b/libgo/misc/cgo/testcarchive/testdata/main_unix.c
@@ -36,7 +36,7 @@ return 2; } // gccgo does not set SA_ONSTACK for SIGSEGV. - if (getenv("GCCGO") == "" && (osa.sa_flags&SA_ONSTACK) == 0) { + if (getenv("GCCGO") == NULL && (osa.sa_flags&SA_ONSTACK) == 0) { fprintf(stderr, "Go runtime did not install signal handler\n"); return 2; }