[zircon][unittest] Rename bad-syscall.c to bad-syscall.cpp

Also a minor pointer change to get it to build in cpp.

ZX-3711

Test: /boot/test/core/bad-syscall-test

Change-Id: Ide89ef4f4154770f9f7e8160163982f65e8c15e8
diff --git a/zircon/system/utest/core/bad-syscall/BUILD.gn b/zircon/system/utest/core/bad-syscall/BUILD.gn
index 5f7042f..4fe14a1 100644
--- a/zircon/system/utest/core/bad-syscall/BUILD.gn
+++ b/zircon/system/utest/core/bad-syscall/BUILD.gn
@@ -7,7 +7,7 @@
 source_set("bad-syscall") {
   testonly = true
   sources = [
-    "bad-syscall.c",
+    "bad-syscall.cpp",
     "syscall.S",
   ]
   defines = [ "KERNEL_ASPACE_BASE=$kernel_aspace_base" ]
diff --git a/zircon/system/utest/core/bad-syscall/bad-syscall.c b/zircon/system/utest/core/bad-syscall/bad-syscall.cpp
similarity index 92%
rename from zircon/system/utest/core/bad-syscall/bad-syscall.c
rename to zircon/system/utest/core/bad-syscall/bad-syscall.cpp
index 9fdf245..7bdbbad 100644
--- a/zircon/system/utest/core/bad-syscall/bad-syscall.c
+++ b/zircon/system/utest/core/bad-syscall/bad-syscall.cpp
@@ -10,7 +10,7 @@
 #include <zircon/syscalls.h>
 #include <unittest/unittest.h>
 
-extern zx_status_t bad_syscall(uint64_t num);
+extern "C" zx_status_t bad_syscall(uint64_t num);
 
 bool bad_access_test(void) {
     BEGIN_TEST;
@@ -20,7 +20,7 @@
               0, "Error: channel create failed");
     EXPECT_LT(zx_channel_write(0, h[0], unmapped_addr, 1, NULL, 0),
               0, "Error: reading unmapped addr");
-    EXPECT_LT(zx_channel_write(h[0], 0, (void*)KERNEL_ASPACE_BASE - 1, 5, NULL, 0),
+    EXPECT_LT(zx_channel_write(h[0], 0, (void*)(KERNEL_ASPACE_BASE - 1), 5, NULL, 0),
               0, "Error: read crossing kernel boundary");
     EXPECT_LT(zx_channel_write(h[0], 0, (void*)KERNEL_ASPACE_BASE, 1, NULL, 0),
               0, "Error: read into kernel space");