gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated (7a70077cd -> 6e489113f)


From: gnunet
Subject: [gnunet] branch master updated (7a70077cd -> 6e489113f)
Date: Wed, 25 Dec 2019 13:49:47 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository gnunet.

    from 7a70077cd clean up code a bit
     new b5e0f7959 use new_array
     new e8879b468 use static array
     new 6e489113f use unsigned

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/transport/test_communicator_basic.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/transport/test_communicator_basic.c 
b/src/transport/test_communicator_basic.c
index 74bd831b4..0bca5f695 100644
--- a/src/transport/test_communicator_basic.c
+++ b/src/transport/test_communicator_basic.c
@@ -54,7 +54,7 @@ GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle 
*tc_hs[NUM_PEERS];
 
 static struct GNUNET_CONFIGURATION_Handle *cfg_peers[NUM_PEERS];
 
-static char **cfg_peers_name;
+static char *cfg_peers_name[NUM_PEERS];
 
 static int ret;
 
@@ -225,6 +225,7 @@ static void
 long_test (void *cls)
 {
   char *payload;
+
   if (num_sent < BURST_PACKETS)
   {
     payload = make_payload (LONG_MESSAGE_SIZE);
@@ -375,7 +376,6 @@ incoming_message_cb (void *cls,
         GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &long_test,
                                       NULL);
       }
-
       break;
     }
   case TP_BURST_LONG:
@@ -412,7 +412,6 @@ incoming_message_cb (void *cls,
         to_task = NULL;
         GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &size_test,
                                       NULL);
-
       }
       break;
     }
@@ -462,7 +461,7 @@ run (void *cls)
   ret = 0;
   num_received = 0;
   num_sent = 0;
-  for (int i = 0; i < NUM_PEERS; i++)
+  for (unsigned int i = 0; i < NUM_PEERS; i++)
   {
     tc_hs[i] = GNUNET_TRANSPORT_TESTING_transport_communicator_service_start (
       "transport",
@@ -485,12 +484,11 @@ main (int argc,
   struct GNUNET_CRYPTO_EddsaPrivateKey *private_key;
   char *communicator_name;
   char *cfg_peer;
-  ret = 1;
 
+  ret = 1;
   communicator_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
   GNUNET_asprintf (&communicator_binary, "gnunet-communicator-%s",
                    communicator_name);
-  cfg_peers_name = GNUNET_malloc (sizeof(char*) * NUM_PEERS);
   if (GNUNET_OK != GNUNET_log_setup ("test_communicator_basic",
                                      "DEBUG",
                                      "test_communicator_basic.log"))
@@ -499,7 +497,7 @@ main (int argc,
     GNUNET_break (0);
     return 2;
   }
-  for (int i = 0; i < NUM_PEERS; i++)
+  for (unsigned int i = 0; i < NUM_PEERS; i++)
   {
     GNUNET_asprintf ((&cfg_peer),
                      "test_communicator_%s_peer%u.conf",
@@ -544,7 +542,8 @@ main (int argc,
     GNUNET_free (private_key);
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Identity of peer %u is %s\n",
-                i, GNUNET_i2s_full (&peer_id[i]));
+                i,
+                GNUNET_i2s_full (&peer_id[i]));
   }
   fprintf (stderr, "Starting test...\n");
   GNUNET_SCHEDULER_run (&run,

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]