aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_common_allocation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/test_common_allocation.c')
-rw-r--r--src/util/test_common_allocation.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/util/test_common_allocation.c b/src/util/test_common_allocation.c
index 2fb1329b1..950f0cedb 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);