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; }