src/template: format
authorng0 <ng0@n0.is>
Thu, 25 Apr 2019 22:29:55 +0000 (22:29 +0000)
committerng0 <ng0@n0.is>
Thu, 25 Apr 2019 22:29:55 +0000 (22:29 +0000)
src/template/gnunet-service-template.c
src/template/gnunet-template.c
src/template/test_template_api.c

index 7c65751638e1c2e50c52102dc08a2ab6373327d2..92fd9754f2ead69d9c2b497128ed47b4465d842f 100644 (file)
@@ -11,7 +11,7 @@
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
-    
+
      You should have received a copy of the GNU Affero General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -49,8 +49,8 @@ cleanup_task (void *cls)
  */
 static void *
 client_connect_cb (void *cls,
-                  struct GNUNET_SERVICE_Client *c,
-                  struct GNUNET_MQ_Handle *mq)
+                   struct GNUNET_SERVICE_Client *c,
+                   struct GNUNET_MQ_Handle *mq)
 {
   return c;
 }
@@ -65,8 +65,8 @@ client_connect_cb (void *cls,
  */
 static void
 client_disconnect_cb (void *cls,
-                     struct GNUNET_SERVICE_Client *c,
-                     void *internal_cls)
+                      struct GNUNET_SERVICE_Client *c,
+                      void *internal_cls)
 {
   GNUNET_assert (c == internal_cls);
 }
@@ -85,22 +85,20 @@ run (void *cls,
      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 */
index ec2c8f6246d25f96882e5116d3d4780db2083a7a..44dec992bbdadb7fc2718e796bf0a375f85e56e6 100644 (file)
@@ -11,7 +11,7 @@
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
-    
+
      You should have received a copy of the GNU Affero General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -63,21 +63,20 @@ 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;
 }
 
index 9a588cf8f00cc9a72893171078ce28cff2da1a8e..7956a4d29f1c18893980513ce25df4541de18951 100644 (file)
@@ -11,7 +11,7 @@
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
-    
+
      You should have received a copy of the GNU Affero General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.