-fix off-by-1
[oweals/gnunet.git] / src / statistics / statistics_api.c
index 1592483f86ad7261932bd782e3c1c7c7109e69b9..32b973eeccfe8af5ab306a6a7ee536c018af0625 100644 (file)
@@ -462,11 +462,9 @@ try_connect (struct GNUNET_STATISTICS_Handle *h)
  * We've waited long enough, reconnect now.
  *
  * @param cls the `struct GNUNET_STATISTICS_Handle` to reconnect
- * @param tc scheduler context (unused)
  */
 static void
-reconnect_task (void *cls,
-                const struct GNUNET_SCHEDULER_TaskContext *tc)
+reconnect_task (void *cls)
 {
   struct GNUNET_STATISTICS_Handle *h = cls;
 
@@ -479,11 +477,9 @@ reconnect_task (void *cls,
  * Task used by 'reconnect_later' to shutdown the handle
  *
  * @param cls the statistics handle
- * @param tc scheduler context
  */
 static void
-do_destroy (void *cls,
-            const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_destroy (void *cls)
 {
   struct GNUNET_STATISTICS_Handle *h = cls;
 
@@ -627,11 +623,9 @@ process_watch_value (struct GNUNET_STATISTICS_Handle *h,
  * Task used to destroy the statistics handle.
  *
  * @param cls the `struct GNUNET_STATISTICS_Handle`
- * @param tc the scheduler context
  */
 static void
-destroy_task (void *cls,
-             const struct GNUNET_SCHEDULER_TaskContext *tc)
+destroy_task (void *cls)
 {
   struct GNUNET_STATISTICS_Handle *h = cls;
 
@@ -1159,11 +1153,9 @@ schedule_action (struct GNUNET_STATISTICS_Handle *h)
  * call the continuation.
  *
  * @param cls the `struct GNUNET_STATISTICS_GetHandle`
- * @param tc scheduler context
  */
 static void
-run_get_timeout (void *cls,
-                 const struct GNUNET_SCHEDULER_TaskContext *tc)
+run_get_timeout (void *cls)
 {
   struct GNUNET_STATISTICS_GetHandle *gh = cls;
   GNUNET_STATISTICS_Callback cont = gh->cont;
@@ -1225,7 +1217,8 @@ GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle,
   ai->timeout_task = GNUNET_SCHEDULER_add_delayed (timeout,
                                                    &run_get_timeout,
                                                    ai);
-  GNUNET_CONTAINER_DLL_insert_tail (handle->action_head, handle->action_tail,
+  GNUNET_CONTAINER_DLL_insert_tail (handle->action_head,
+                                   handle->action_tail,
                                    ai);
   schedule_action (handle);
   return ai;