From f146e80752e73247acb9d6c7463188a82d26a774 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 4 Oct 2021 12:15:43 +0200 Subject: -taking a first stab at cleaning up the testing mess --- src/testing/testing_api_cmd_send_peer_ready.c | 29 +++++++++++++-------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'src/testing/testing_api_cmd_send_peer_ready.c') diff --git a/src/testing/testing_api_cmd_send_peer_ready.c b/src/testing/testing_api_cmd_send_peer_ready.c index 016837214..8b4c11deb 100644 --- a/src/testing/testing_api_cmd_send_peer_ready.c +++ b/src/testing/testing_api_cmd_send_peer_ready.c @@ -53,13 +53,13 @@ struct SendPeerReadyState * Trait function of this cmd does nothing. * */ -static int +static enum GNUNET_GenericReturnValue send_peer_ready_traits (void *cls, const void **ret, const char *trait, unsigned int index) { - return GNUNET_OK; + return GNUNET_NO; } @@ -68,8 +68,7 @@ send_peer_ready_traits (void *cls, * */ static void -send_peer_ready_cleanup (void *cls, - const struct GNUNET_TESTING_Command *cmd) +send_peer_ready_cleanup (void *cls) { struct SendPeerReadyState *sprs = cls; @@ -84,7 +83,6 @@ send_peer_ready_cleanup (void *cls, */ static void send_peer_ready_run (void *cls, - const struct GNUNET_TESTING_Command *cmd, struct GNUNET_TESTING_Interpreter *is) { struct SendPeerReadyState *sprs = cls; @@ -115,14 +113,15 @@ GNUNET_TESTING_cmd_send_peer_ready (const char *label, sprs = GNUNET_new (struct SendPeerReadyState); sprs->write_message = write_message; - - struct GNUNET_TESTING_Command cmd = { - .cls = sprs, - .label = label, - .run = &send_peer_ready_run, - .cleanup = &send_peer_ready_cleanup, - .traits = &send_peer_ready_traits - }; - - return cmd; + { + struct GNUNET_TESTING_Command cmd = { + .cls = sprs, + .label = label, + .run = &send_peer_ready_run, + .cleanup = &send_peer_ready_cleanup, + .traits = &send_peer_ready_traits + }; + + return cmd; + } } -- cgit v1.2.3