-nicer logging
[oweals/gnunet.git] / src / ats-tests / ats-testing-preferences.c
index 1b11bd924631dbcd373fc900846d64d394ceee78..e5f32d6b12671d97ce7c0a93e324b06553da59aa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  This file is part of GNUnet.
- (C) 2010-2013 Christian Grothoff (and other contributing authors)
Copyright (C) 2010-2013 Christian Grothoff (and other contributing authors)
 
  GNUnet is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published
@@ -96,7 +96,7 @@ set_pref_task (void *cls,
 {
   struct BenchmarkPartner *p = cls;
   double pref_value;
-  p->pg->set_task = GNUNET_SCHEDULER_NO_TASK;
+  p->pg->set_task = NULL;
 
   pref_value = get_preference (p->pg);
 
@@ -106,7 +106,10 @@ set_pref_task (void *cls,
       GNUNET_ATS_print_preference_type (p->pg->kind), pref_value);
 
   GNUNET_ATS_performance_change_preference(p->me->ats_perf_handle,
-      &p->dest->id, p->pg->kind, pref_value, GNUNET_ATS_PREFERENCE_END);
+                                           &p->dest->id,
+                                           p->pg->kind,
+                                           pref_value,
+                                           GNUNET_ATS_PREFERENCE_END);
 
   switch (p->pg->kind) {
     case GNUNET_ATS_PREFERENCE_BANDWIDTH:
@@ -214,10 +217,10 @@ GNUNET_ATS_TEST_generate_preferences_stop (struct PreferenceGenerator *pg)
   GNUNET_CONTAINER_DLL_remove (pg_head, pg_tail, pg);
   pg->dest->pg = NULL;
 
-  if (GNUNET_SCHEDULER_NO_TASK != pg->set_task)
+  if (NULL != pg->set_task)
   {
     GNUNET_SCHEDULER_cancel (pg->set_task);
-    pg->set_task = GNUNET_SCHEDULER_NO_TASK;
+    pg->set_task = NULL;
   }
 
   GNUNET_free (pg);
@@ -241,4 +244,3 @@ GNUNET_ATS_TEST_generate_preferences_stop_all ()
 }
 
 /* end of file ats-testing-preferences.c */
-