uncrustify as demanded.
[oweals/gnunet.git] / src / testbed / testbed_api_test.c
index 3f9400bda0c209a8fb658553fab90dcbad3cebef..7294a137ed066db689ccb3bb56a75e72e45899a5 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/>.
 
@@ -31,8 +31,7 @@
 /**
  * Context information for test run
  */
-struct TestRunContext
-{
+struct TestRunContext {
   /**
    * Test master callback
    */
@@ -74,13 +73,13 @@ struct TestRunContext
  * @param config the configuration file handle
  */
 static void
-run (void *cls, char *const *args, const char *cfgfile,
-     const struct GNUNET_CONFIGURATION_Handle *config)
+run(void *cls, char *const *args, const char *cfgfile,
+    const struct GNUNET_CONFIGURATION_Handle *config)
 {
   struct TestRunContext *rc = cls;
 
-  GNUNET_TESTBED_run (NULL, config, rc->num_peers, rc->event_mask, rc->cc,
-                      rc->cc_cls, rc->test_master, rc->test_master_cls);
+  GNUNET_TESTBED_run(NULL, config, rc->num_peers, rc->event_mask, rc->cc,
+                     rc->cc_cls, rc->test_master, rc->test_master_cls);
 }
 
 
@@ -118,14 +117,14 @@ run (void *cls, char *const *args, const char *cfgfile,
  * @return #GNUNET_SYSERR on error, #GNUNET_OK on success
  */
 int
-GNUNET_TESTBED_test_run (const char *testname,
-                         const char *cfg_filename,
-                         unsigned int num_peers,
-                         uint64_t event_mask,
-                         GNUNET_TESTBED_ControllerCallback cc,
-                         void *cc_cls,
-                         GNUNET_TESTBED_TestMaster test_master,
-                         void *test_master_cls)
+GNUNET_TESTBED_test_run(const char *testname,
+                        const char *cfg_filename,
+                        unsigned int num_peers,
+                        uint64_t event_mask,
+                        GNUNET_TESTBED_ControllerCallback cc,
+                        void *cc_cls,
+                        GNUNET_TESTBED_TestMaster test_master,
+                        void *test_master_cls)
 {
   char *argv2[] = {
     NULL,
@@ -139,23 +138,23 @@ GNUNET_TESTBED_test_run (const char *testname,
   struct TestRunContext *rc;
   int ret;
 
-  argv2[0] = GNUNET_strdup (testname);
-  argv2[2] = GNUNET_strdup (cfg_filename);
-  GNUNET_assert (NULL != test_master);
-  GNUNET_assert (num_peers > 0);
-  rc = GNUNET_malloc (sizeof (struct TestRunContext) +
-                      (num_peers * sizeof (struct GNUNET_TESTBED_Peer *)));
+  argv2[0] = GNUNET_strdup(testname);
+  argv2[2] = GNUNET_strdup(cfg_filename);
+  GNUNET_assert(NULL != test_master);
+  GNUNET_assert(num_peers > 0);
+  rc = GNUNET_malloc(sizeof(struct TestRunContext) +
+                     (num_peers * sizeof(struct GNUNET_TESTBED_Peer *)));
   rc->test_master = test_master;
   rc->test_master_cls = test_master_cls;
   rc->num_peers = num_peers;
   rc->event_mask = event_mask;
   rc->cc = cc;
   rc->cc_cls = cc_cls;
-  ret = GNUNET_PROGRAM_run ((sizeof (argv2) / sizeof (char *)) - 1, argv2,
-                            testname, "nohelp", options, &run, rc);
-  GNUNET_free (rc);
-  GNUNET_free (argv2[0]);
-  GNUNET_free (argv2[2]);
+  ret = GNUNET_PROGRAM_run((sizeof(argv2) / sizeof(char *)) - 1, argv2,
+                           testname, "nohelp", options, &run, rc);
+  GNUNET_free(rc);
+  GNUNET_free(argv2[0]);
+  GNUNET_free(argv2[2]);
   return ret;
 }