diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-11 09:43:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-11 09:43:04 +0000 |
commit | d9d94d0e53d26af75ec8241383d166544ebd79f3 (patch) | |
tree | 9080b73624389403a198257fe0547bb4634e64d2 /src/util/test_common_allocation.c | |
parent | 2d792ee2e9cc0c993b8907e2c8edb0c2b8465343 (diff) | |
download | gnunet-d9d94d0e53d26af75ec8241383d166544ebd79f3.tar.gz gnunet-d9d94d0e53d26af75ec8241383d166544ebd79f3.zip |
converting to GNUNET_LOG_from*
Diffstat (limited to 'src/util/test_common_allocation.c')
-rw-r--r-- | src/util/test_common_allocation.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/util/test_common_allocation.c b/src/util/test_common_allocation.c index 950f0cedb..2fb1329b1 100644 --- a/src/util/test_common_allocation.c +++ b/src/util/test_common_allocation.c | |||
@@ -36,21 +36,21 @@ check () | |||
36 | unsigned int ui; | 36 | unsigned int ui; |
37 | 37 | ||
38 | /* GNUNET_malloc/GNUNET_free test */ | 38 | /* GNUNET_malloc/GNUNET_free test */ |
39 | k = 352; /* random start value */ | 39 | k = 352; /* random start value */ |
40 | for (i = 1; i < MAX_TESTVAL; i++) | 40 | for (i = 1; i < MAX_TESTVAL; i++) |
41 | { | 41 | { |
42 | ptrs[i] = GNUNET_malloc (i); | 42 | ptrs[i] = GNUNET_malloc (i); |
43 | for (j = 0; j < i; j++) | 43 | for (j = 0; j < i; j++) |
44 | ptrs[i][j] = k++; | 44 | ptrs[i][j] = k++; |
45 | } | 45 | } |
46 | 46 | ||
47 | for (i = MAX_TESTVAL - 1; i >= 1; i--) | 47 | for (i = MAX_TESTVAL - 1; i >= 1; i--) |
48 | { | 48 | { |
49 | for (j = i - 1; j >= 0; j--) | 49 | for (j = i - 1; j >= 0; j--) |
50 | if (ptrs[i][j] != (char) --k) | 50 | if (ptrs[i][j] != (char) --k) |
51 | return 1; | 51 | return 1; |
52 | GNUNET_free (ptrs[i]); | 52 | GNUNET_free (ptrs[i]); |
53 | } | 53 | } |
54 | 54 | ||
55 | /* GNUNET_free_non_null test */ | 55 | /* GNUNET_free_non_null test */ |
56 | GNUNET_free_non_null (NULL); | 56 | GNUNET_free_non_null (NULL); |