fixing unchecked return values
[oweals/gnunet.git] / src / transport / test_quota_compliance.c
index 37960e20463fbf200ff2707afc94acca3134efc0..e1dbc17b61962ba2c03b35066ea4866d62b6b80e 100644 (file)
@@ -129,8 +129,8 @@ end ()
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping peers\n");
 
-  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value;
-  datarate = (total_bytes_sent * 1000) / delta;
+  delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value_us;
+  datarate = (total_bytes_sent * 1000 * 1000) / delta;
 
   FPRINTF (stderr, "Throughput was %llu b/s\n", datarate);
 
@@ -336,7 +336,7 @@ notify_ready (void *cls, size_t size, void *buf)
   if (n < TOTAL_MSGS)
   {
     if (th == NULL)
-      th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s, 0,
+      th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, s,
                                                    TIMEOUT_TRANSMIT,
                                                    &notify_ready, NULL);
     msg_scheduled = n;
@@ -384,7 +384,7 @@ static void
 sendtask ()
 {
   start_time = GNUNET_TIME_absolute_get ();
-  th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0), 0,
+  th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, get_size (0),
                                                TIMEOUT_TRANSMIT, &notify_ready,
                                                NULL);
 }
@@ -398,7 +398,7 @@ measure (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   measure_task = GNUNET_SCHEDULER_NO_TASK;
 
   counter++;
-  if ((DURATION.rel_value / 1000) < counter)
+  if ((DURATION.rel_value_us / 1000 / 1000LL) < counter)
   {
     FPRINTF (stderr, "%s",  ".\n");
     GNUNET_SCHEDULER_add_now (&end, NULL);