- minor renamings
[oweals/gnunet.git] / src / testing / testing.c
index 62f9cb1a319ac22c5bfccc1ff1aa8a0e2722b5d6..5cb823575356beebfaa6136e239193a9359d59c6 100644 (file)
@@ -387,7 +387,7 @@ GNUNET_TESTING_system_create_with_portrange (const char *testdir,
   unsigned int cnt;
 
   GNUNET_assert (NULL != testdir);
-  system = GNUNET_malloc (sizeof (struct GNUNET_TESTING_System));
+  system = GNUNET_new (struct GNUNET_TESTING_System);
   if (NULL == (system->tmppath = getenv (GNUNET_TESTING_PREFIX)))
     system->tmppath = GNUNET_DISK_mkdtemp (testdir);
   else
@@ -413,7 +413,7 @@ GNUNET_TESTING_system_create_with_portrange (const char *testdir,
   for (cnt = 0; NULL != shared_services[cnt].service; cnt++)
   {
     tss = shared_services[cnt];
-    ss = GNUNET_malloc (sizeof (struct SharedService));
+    ss = GNUNET_new (struct SharedService);
     ss->sname = GNUNET_strdup (tss.service);
     ss->cfg = GNUNET_CONFIGURATION_create ();
     GNUNET_CONFIGURATION_iterate_section_values (tss.cfg, ss->sname,
@@ -1224,7 +1224,10 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
     ss = system->shared_services[cnt];
     ss_instances[cnt] = associate_shared_service (system, ss, cfg);
     if (NULL == ss_instances[cnt])
+    {
+      emsg_ = GNUNET_strdup ("FIXME");
       goto err_ret;
+    }
   }
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CONFIGURATION_get_value_filename
@@ -1239,7 +1242,7 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
     GNUNET_free (config_filename);
     goto err_ret;
   }
-  peer = GNUNET_malloc (sizeof (struct GNUNET_TESTING_Peer));
+  peer = GNUNET_new (struct GNUNET_TESTING_Peer);
   peer->ss_instances = ss_instances;
   peer->cfgfile = config_filename; /* Free in peer_destroy */
   peer->cfg = GNUNET_CONFIGURATION_dup (cfg);
@@ -1288,7 +1291,7 @@ GNUNET_TESTING_peer_get_identity (struct GNUNET_TESTING_Peer *peer,
     memcpy (id, peer->id, sizeof (struct GNUNET_PeerIdentity));
     return;
   }
-  peer->id = GNUNET_malloc (sizeof (struct GNUNET_PeerIdentity));
+  peer->id = GNUNET_new (struct GNUNET_PeerIdentity);
   GNUNET_free (GNUNET_TESTING_hostkey_get (peer->system,
                                                          peer->key_number,
                                                          peer->id));