]> git.ozlabs.org Git - ccan/blobdiff - ccan/antithread/test/run-spawn.c
antithread: fix -Wwrite-strings warning in test, and trailing whitespace.
[ccan] / ccan / antithread / test / run-spawn.c
index d2987278204e15ef3b66be28ac13d0200b086baa..f1dcd2f82c1cc2322028ac7569d57d42a916f057 100644 (file)
@@ -1,6 +1,6 @@
-#include "antithread/antithread.c"
+#include <ccan/antithread/antithread.c>
 #include <assert.h>
 #include <assert.h>
-#include "tap/tap.h"
+#include <ccan/tap/tap.h>
 
 int main(int argc, char *argv[])
 {
 
 int main(int argc, char *argv[])
 {
@@ -8,7 +8,7 @@ int main(int argc, char *argv[])
        struct athread *at;
        int err, *pid;
        void *arg;
        struct athread *at;
        int err, *pid;
        void *arg;
-       char *bad_args[] = { "/", NULL };
+       char *bad_args[] = { (char *)"/", NULL };
 
        atp = at_get_pool(&argc, argv, &arg);
        if (atp) {
 
        atp = at_get_pool(&argc, argv, &arg);
        if (atp) {
@@ -26,8 +26,8 @@ int main(int argc, char *argv[])
        assert(atp);
        pid = talloc(at_pool_ctx(atp), int);
        assert(pid);
        assert(atp);
        pid = talloc(at_pool_ctx(atp), int);
        assert(pid);
-       ok1((char *)pid >= (char *)atp->pool
-           && (char *)pid < (char *)atp->pool + atp->poolsize);
+       ok1((char *)pid >= (char *)atp->p->pool
+           && (char *)pid < (char *)atp->p->pool + atp->p->poolsize);
 
        /* This is a failed spawn. */
        at = at_spawn(atp, pid, bad_args);
 
        /* This is a failed spawn. */
        at = at_spawn(atp, pid, bad_args);