- use proper signedness
[oweals/gnunet.git] / src / datastore / test_datastore_api_management.c
index 9eae32f4ae59939fe82dd9cd08d324d0ffcdf251..5553e5c0beb405f11622f2de281f3ee456a3a5d6 100644 (file)
@@ -113,7 +113,7 @@ get_expiration (int i)
 {
   struct GNUNET_TIME_Absolute av;
 
-  av.abs_value = now.abs_value + i * 1000;
+  av.abs_value_us = now.abs_value_us + i * 1000 * 1000LL;
   return av;
 }
 
@@ -159,7 +159,7 @@ check_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
   GNUNET_assert (type == get_type (i));
   GNUNET_assert (priority == get_priority (i));
   GNUNET_assert (anonymity == get_anonymity (i));
-  GNUNET_assert (expiration.abs_value == get_expiration (i).abs_value);
+  GNUNET_assert (expiration.abs_value_us == get_expiration (i).abs_value_us);
   crc->offset++;
   crc->i--;
   if (crc->i == 0)
@@ -258,14 +258,14 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c
 
 
 static void
-run (void *cls, 
+run (void *cls,
      const struct GNUNET_CONFIGURATION_Handle *cfg,
      struct GNUNET_TESTING_Peer *peer)
 {
   struct CpsRunContext *crc;
   static struct GNUNET_HashCode zkey;
 
-  crc = GNUNET_malloc (sizeof (struct CpsRunContext));
+  crc = GNUNET_new (struct CpsRunContext);
   crc->cfg = cfg;
   crc->phase = RP_PUT;
   now = GNUNET_TIME_absolute_get ();