]> git.ozlabs.org Git - ccan/blobdiff - tools/configurator/configurator.c
tools/configurator: fix compile error with -O2
[ccan] / tools / configurator / configurator.c
index c8b131cc708f214d61b269b18ab8b081fe51e685..33651ef4df3bc95c27ad12a25327439a40ce4213 100644 (file)
@@ -411,7 +411,7 @@ static const struct test base_tests[] = {
          "int main(int argc, char *argv[]) {\n"
          "     (void)argc;\n"
          "     char pad[sizeof(int *) * 1];\n"
-         "     strncpy(pad, argv[0], sizeof(pad));\n"
+         "     memcpy(pad, argv[0], sizeof(pad));\n"
          "     int *x = (int *)pad, *y = (int *)(pad + 1);\n"
          "     return *x == *y;\n"
          "}\n" },