simplify driver_add_multiple
authorlurchi <lurchi@strangeplace.net>
Thu, 4 Jan 2018 19:27:19 +0000 (20:27 +0100)
committerlurchi <lurchi@strangeplace.net>
Thu, 4 Jan 2018 19:27:19 +0000 (20:27 +0100)
src/util/scheduler.c

index 7bd19df7ab68e26e5f8e4127e77526dfc5b221b5..fecbc0de521b24861202b0e6934f0883c2db0c92 100644 (file)
@@ -848,8 +848,7 @@ init_fd_info (struct GNUNET_SCHEDULER_Task *t,
  *           @a driver_func on it, or -1 if no updating not desired.
  */
 static void
-driver_add_multiple (struct GNUNET_SCHEDULER_Task *t,
-                    enum GNUNET_SCHEDULER_EventType et)
+driver_add_multiple (struct GNUNET_SCHEDULER_Task *t)
 {
   struct GNUNET_SCHEDULER_FdInfo *fdi;
   int success = GNUNET_YES;
@@ -860,10 +859,7 @@ driver_add_multiple (struct GNUNET_SCHEDULER_Task *t,
     success = scheduler_driver->add (scheduler_driver->cls,
                                     t,
                                     fdi) && success;
-    if (et != -1)
-    {
-      fdi->et = et;
-    }
+    fdi->et = GNUNET_SCHEDULER_ET_NONE; 
   }
   if (GNUNET_YES != success)
   {
@@ -1381,7 +1377,7 @@ add_without_sets (struct GNUNET_TIME_Relative delay,
   GNUNET_CONTAINER_DLL_insert (pending_head,
                                pending_tail,
                                t);
-  driver_add_multiple (t, GNUNET_SCHEDULER_ET_NONE);
+  driver_add_multiple (t);
   max_priority_added = GNUNET_MAX (max_priority_added,
                                    t->priority);
   init_backtrace (t);
@@ -1823,7 +1819,7 @@ GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio,
   GNUNET_CONTAINER_DLL_insert (pending_head,
                                pending_tail,
                                t);
-  driver_add_multiple (t, GNUNET_SCHEDULER_ET_NONE);
+  driver_add_multiple (t);
   max_priority_added = GNUNET_MAX (max_priority_added,
            t->priority);
   LOG (GNUNET_ERROR_TYPE_DEBUG,