gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37279 - gnunet/src/peerstore


From: gnunet
Subject: [GNUnet-SVN] r37279 - gnunet/src/peerstore
Date: Sat, 18 Jun 2016 22:38:04 +0200

Author: grothoff
Date: 2016-06-18 22:38:04 +0200 (Sat, 18 Jun 2016)
New Revision: 37279

Modified:
   gnunet/src/peerstore/test_peerstore_api_store.c
Log:
-fixing part of Martin's FTBFS

Modified: gnunet/src/peerstore/test_peerstore_api_store.c
===================================================================
--- gnunet/src/peerstore/test_peerstore_api_store.c     2016-06-18 20:26:06 UTC 
(rev 37278)
+++ gnunet/src/peerstore/test_peerstore_api_store.c     2016-06-18 20:38:04 UTC 
(rev 37279)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C)
+     Copyright (C) GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -22,10 +22,10 @@
  * @brief testcase for peerstore store operation
  */
 #include "platform.h"
-#include "gnunet_util_lib.h"
+#include "gnunet_peerstore_service.h"
 #include "gnunet_testing_lib.h"
-#include "gnunet_peerstore_service.h"
 
+
 static int ok = 1;
 
 static struct GNUNET_PEERSTORE_Handle *h;
@@ -39,24 +39,24 @@
 
 static int count = 0;
 
-static int
-test3_cont2 (void *cls, const struct GNUNET_PEERSTORE_Record *record,
+static void
+test3_cont2 (void *cls,
+             const struct GNUNET_PEERSTORE_Record *record,
              const char *emsg)
 {
   if (NULL != emsg)
-    return GNUNET_NO;
+    return;
   if (NULL != record)
   {
     GNUNET_assert ((strlen (val3) + 1) == record->value_size);
     GNUNET_assert (0 == strcmp ((char *) val3, (char *) record->value));
     count++;
-    return GNUNET_YES;
+    return;
   }
   GNUNET_assert (count == 1);
   ok = 0;
   GNUNET_PEERSTORE_disconnect (h, GNUNET_YES);
   GNUNET_SCHEDULER_shutdown ();
-  return GNUNET_YES;
 }
 
 
@@ -66,7 +66,11 @@
   if (GNUNET_YES != success)
     return;
   count = 0;
-  GNUNET_PEERSTORE_iterate (h, subsystem, &pid, key, GNUNET_TIME_UNIT_SECONDS,
+  GNUNET_PEERSTORE_iterate (h,
+                            subsystem,
+                            &pid,
+                            key,
+                            GNUNET_TIME_UNIT_SECONDS,
                             &test3_cont2, NULL);
 }
 
@@ -84,12 +88,13 @@
 }
 
 
-static int
-test2_cont2 (void *cls, const struct GNUNET_PEERSTORE_Record *record,
+static void
+test2_cont2 (void *cls,
+             const struct GNUNET_PEERSTORE_Record *record,
              const char *emsg)
 {
   if (NULL != emsg)
-    return GNUNET_NO;
+    return;
   if (NULL != record)
   {
     GNUNET_assert (((strlen (val1) + 1) == record->value_size) ||
@@ -97,12 +102,11 @@
     GNUNET_assert ((0 == strcmp ((char *) val1, (char *) record->value)) ||
                    (0 == strcmp ((char *) val2, (char *) record->value)));
     count++;
-    return GNUNET_YES;
+    return;
   }
   GNUNET_assert (count == 2);
   count = 0;
   test3 ();
-  return GNUNET_YES;
 }
 
 
@@ -112,7 +116,10 @@
   if (GNUNET_YES != success)
     return;
   count = 0;
-  GNUNET_PEERSTORE_iterate (h, subsystem, &pid, key, GNUNET_TIME_UNIT_SECONDS,
+  GNUNET_PEERSTORE_iterate (h,
+                            subsystem,
+                            &pid, key,
+                            GNUNET_TIME_UNIT_SECONDS,
                             &test2_cont2, NULL);
 }
 
@@ -130,23 +137,23 @@
 }
 
 
-static int
-test1_cont2 (void *cls, const struct GNUNET_PEERSTORE_Record *record,
+static void
+test1_cont2 (void *cls,
+             const struct GNUNET_PEERSTORE_Record *record,
              const char *emsg)
 {
   if (NULL != emsg)
-    return GNUNET_NO;
+    return;
   if (NULL != record)
   {
     GNUNET_assert ((strlen (val1) + 1) == record->value_size);
     GNUNET_assert (0 == strcmp ((char *) val1, (char *) record->value));
     count++;
-    return GNUNET_YES;
+    return;
   }
   GNUNET_assert (count == 1);
   count = 0;
   test2 ();
-  return GNUNET_YES;
 }
 
 




reply via email to

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