X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fcoroutine%2Ftest%2Fapi-3.c;h=129126549e3edb6ceefd39bb8d2e281dad80587e;hp=dcc3531250683d49c3ef3d9c52281917e9445598;hb=d24c5a0105b14dd20efd6c3c9f1ae0a35ca50c84;hpb=ace6131ed7d12a48fc6f019a0d69e94f30c5cd3e diff --git a/ccan/coroutine/test/api-3.c b/ccan/coroutine/test/api-3.c index dcc35312..12912654 100644 --- a/ccan/coroutine/test/api-3.c +++ b/ccan/coroutine/test/api-3.c @@ -27,7 +27,6 @@ static void clobber(void *p) buf[i] = random() & 0xff; } - s->total = 0; for (i = 0; i < sizeof(buf); i++) { s->total += buf[i]; } @@ -48,6 +47,7 @@ static void test_metadata(struct coroutine_stack *stack) if (COROUTINE_AVAILABLE) { struct coroutine_state t; struct state s = { + .total = 0, }; coroutine_init(&t, clobber, &s, stack);