From d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb Mon Sep 17 00:00:00 2001 From: ng0 Date: Sun, 8 Sep 2019 12:33:09 +0000 Subject: uncrustify as demanded. --- src/template/gnunet-service-template.c | 40 +++++++++++++++++----------------- src/template/gnunet-template.c | 38 +++++++++++++++++--------------- src/template/test_template_api.c | 8 +++---- 3 files changed, 44 insertions(+), 42 deletions(-) (limited to 'src/template') diff --git a/src/template/gnunet-service-template.c b/src/template/gnunet-service-template.c index 92fd9754f..6db030d16 100644 --- a/src/template/gnunet-service-template.c +++ b/src/template/gnunet-service-template.c @@ -16,7 +16,7 @@ along with this program. If not, see . SPDX-License-Identifier: AGPL3.0-or-later -*/ + */ /** * @file template/gnunet-service-template.c @@ -33,7 +33,7 @@ * @param cls unused */ static void -cleanup_task (void *cls) +cleanup_task(void *cls) { /* FIXME: do clean up here */ } @@ -48,9 +48,9 @@ cleanup_task (void *cls) * @return @a c */ static void * -client_connect_cb (void *cls, - struct GNUNET_SERVICE_Client *c, - struct GNUNET_MQ_Handle *mq) +client_connect_cb(void *cls, + struct GNUNET_SERVICE_Client *c, + struct GNUNET_MQ_Handle *mq) { return c; } @@ -64,11 +64,11 @@ client_connect_cb (void *cls, * @param internal_cls should be equal to @a c */ static void -client_disconnect_cb (void *cls, - struct GNUNET_SERVICE_Client *c, - void *internal_cls) +client_disconnect_cb(void *cls, + struct GNUNET_SERVICE_Client *c, + void *internal_cls) { - GNUNET_assert (c == internal_cls); + GNUNET_assert(c == internal_cls); } @@ -80,25 +80,25 @@ client_disconnect_cb (void *cls, * @param service the initialized service */ static void -run (void *cls, - const struct GNUNET_CONFIGURATION_Handle *cfg, - struct GNUNET_SERVICE_Handle *service) +run(void *cls, + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_SERVICE_Handle *service) { /* FIXME: do setup here */ - GNUNET_SCHEDULER_add_shutdown (&cleanup_task, NULL); + GNUNET_SCHEDULER_add_shutdown(&cleanup_task, NULL); } /** * Define "main" method using service macro. */ -GNUNET_SERVICE_MAIN ("template", - GNUNET_SERVICE_OPTION_NONE, - &run, - &client_connect_cb, - &client_disconnect_cb, - NULL, - GNUNET_MQ_handler_end ()); +GNUNET_SERVICE_MAIN("template", + GNUNET_SERVICE_OPTION_NONE, + &run, + &client_connect_cb, + &client_disconnect_cb, + NULL, + GNUNET_MQ_handler_end()); /* end of gnunet-service-template.c */ diff --git a/src/template/gnunet-template.c b/src/template/gnunet-template.c index 44dec992b..1ebb1b512 100644 --- a/src/template/gnunet-template.c +++ b/src/template/gnunet-template.c @@ -16,7 +16,7 @@ along with this program. If not, see . SPDX-License-Identifier: AGPL3.0-or-later -*/ + */ /** * @file template/gnunet-template.c @@ -42,10 +42,10 @@ static int ret; * @param cfg configuration */ static void -run (void *cls, - char *const *args, - const char *cfgfile, - const struct GNUNET_CONFIGURATION_Handle *cfg) +run(void *cls, + char *const *args, + const char *cfgfile, + const struct GNUNET_CONFIGURATION_Handle *cfg) { /* main code here */ } @@ -59,24 +59,26 @@ run (void *cls, * @return 0 ok, 1 on error */ int -main (int argc, char *const *argv) +main(int argc, char *const *argv) { static const struct GNUNET_GETOPT_CommandLineOption options[] = { /* FIMXE: add options here */ - GNUNET_GETOPT_OPTION_END}; - if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) + GNUNET_GETOPT_OPTION_END + }; + + if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args(argc, argv, &argc, &argv)) return 2; - ret = (GNUNET_OK == GNUNET_PROGRAM_run (argc, - argv, - "gnunet-template", - gettext_noop ("help text"), - options, - &run, - NULL)) - ? ret - : 1; - GNUNET_free ((void *) argv); + ret = (GNUNET_OK == GNUNET_PROGRAM_run(argc, + argv, + "gnunet-template", + gettext_noop("help text"), + options, + &run, + NULL)) + ? ret + : 1; + GNUNET_free((void *)argv); return ret; } diff --git a/src/template/test_template_api.c b/src/template/test_template_api.c index 7956a4d29..9f845d975 100644 --- a/src/template/test_template_api.c +++ b/src/template/test_template_api.c @@ -16,7 +16,7 @@ along with this program. If not, see . SPDX-License-Identifier: AGPL3.0-or-later -*/ + */ /** * @file template/test_template_api.c * @brief testcase for template.c @@ -24,17 +24,17 @@ #include "platform.h" static int -check () +check() { return 0; } int -main (int argc, char *argv[]) +main(int argc, char *argv[]) { int ret; - ret = check (); + ret = check(); return ret; } -- cgit v1.2.3