[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 04/04: testcase cleanup
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 04/04: testcase cleanup |
Date: |
Mon, 04 Jun 2018 23:32:15 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 324f6168c2374d7bb71c3632fb6521860d8fdfa1
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jun 4 23:32:09 2018 +0200
testcase cleanup
---
src/datacache/test_datacache_quota.c | 39 ++++++++++++++++++++----------------
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/src/datacache/test_datacache_quota.c
b/src/datacache/test_datacache_quota.c
index 35357a8d2..b89d71a27 100644
--- a/src/datacache/test_datacache_quota.c
+++ b/src/datacache/test_datacache_quota.c
@@ -49,8 +49,6 @@ run (void *cls, char *const *args, const char *cfgfile,
struct GNUNET_DATACACHE_Handle *h;
struct GNUNET_HashCode k;
struct GNUNET_HashCode n;
- unsigned int i;
- unsigned int j;
char buf[3200];
struct GNUNET_TIME_Absolute exp;
@@ -59,36 +57,43 @@ run (void *cls, char *const *args, const char *cfgfile,
if (h == NULL)
{
- FPRINTF (stderr, "%s", "Failed to initialize datacache. Database likely
not setup, skipping test.\n");
+ FPRINTF (stderr,
+ "%s",
+ "Failed to initialize datacache. Database likely not setup,
skipping test.\n");
return;
}
exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS);
memset (buf, 1, sizeof (buf));
memset (&k, 0, sizeof (struct GNUNET_HashCode));
- for (i = 0; i < 10; i++)
+ for (unsigned int i = 0; i < 10; i++)
{
- FPRINTF (stderr, "%s", ".");
- GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
- for (j = i; j < sizeof (buf); j += 10)
+ FPRINTF (stderr,
+ "%s",
+ ".");
+ GNUNET_CRYPTO_hash (&k,
+ sizeof (struct GNUNET_HashCode),
+ &n);
+ for (unsigned int j = i; j < sizeof (buf); j += 10)
{
exp.abs_value_us++;
buf[j] = i;
- ASSERT (GNUNET_OK == GNUNET_DATACACHE_put (h,
- &k,
- GNUNET_YES,
- j,
- buf,
- 1 + i,
- exp,
- 0,
- NULL));
+ ASSERT (GNUNET_OK ==
+ GNUNET_DATACACHE_put (h,
+ &k,
+ GNUNET_YES,
+ j,
+ buf,
+ 1 + i,
+ exp,
+ 0,
+ NULL));
ASSERT (0 < GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL));
}
k = n;
}
FPRINTF (stderr, "%s", "\n");
memset (&k, 0, sizeof (struct GNUNET_HashCode));
- for (i = 0; i < 10; i++)
+ for (unsigned int i = 0; i < 10; i++)
{
FPRINTF (stderr, "%s", ".");
GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
--
To stop receiving notification emails like this one, please contact
address@hidden