projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1876 from octo/issue/1819
[collectd.git]
/
src
/
daemon
/
utils_avltree_test.c
diff --git
a/src/daemon/utils_avltree_test.c
b/src/daemon/utils_avltree_test.c
index
6dbafe1
..
150dd1b
100644
(file)
--- a/
src/daemon/utils_avltree_test.c
+++ b/
src/daemon/utils_avltree_test.c
@@
-24,10
+24,11
@@
* Florian octo Forster <octo at collectd.org>
*/
* Florian octo Forster <octo at collectd.org>
*/
-#include "
testing.h"
+#include "
common.h" /* STATIC_ARRAY_SIZE */
#include "collectd.h"
#include "collectd.h"
+
+#include "testing.h"
#include "utils_avltree.h"
#include "utils_avltree.h"
-#include "common.h" /* STATIC_ARRAY_SIZE */
static int compare_total_count = 0;
#define RESET_COUNTS() do { compare_total_count = 0; } while (0)
static int compare_total_count = 0;
#define RESET_COUNTS() do { compare_total_count = 0; } while (0)
@@
-70,13
+71,12
@@
DEF_TEST(success)
};
c_avl_tree_t *t;
};
c_avl_tree_t *t;
- size_t i;
RESET_COUNTS ();
CHECK_NOT_NULL (t = c_avl_create (compare_callback));
/* insert */
RESET_COUNTS ();
CHECK_NOT_NULL (t = c_avl_create (compare_callback));
/* insert */
- for (i = 0; i < STATIC_ARRAY_SIZE (cases); i++)
+ for (
size_t
i = 0; i < STATIC_ARRAY_SIZE (cases); i++)
{
char *key;
char *value;
{
char *key;
char *value;
@@
-89,11
+89,11
@@
DEF_TEST(success)
}
/* Key already exists. */
}
/* Key already exists. */
- for (i = 0; i < STATIC_ARRAY_SIZE (cases); i++)
+ for (
size_t
i = 0; i < STATIC_ARRAY_SIZE (cases); i++)
EXPECT_EQ_INT (1, c_avl_insert (t, cases[i].key, cases[i].value));
/* get */
EXPECT_EQ_INT (1, c_avl_insert (t, cases[i].key, cases[i].value));
/* get */
- for (i = 0; i < STATIC_ARRAY_SIZE (cases); i++)
+ for (
size_t
i = 0; i < STATIC_ARRAY_SIZE (cases); i++)
{
char *value_ret = NULL;
{
char *value_ret = NULL;
@@
-102,7
+102,7
@@
DEF_TEST(success)
}
/* remove half */
}
/* remove half */
- for (i = 0; i < STATIC_ARRAY_SIZE (cases) / 2; i++)
+ for (
size_t
i = 0; i < STATIC_ARRAY_SIZE (cases) / 2; i++)
{
char *key = NULL;
char *value = NULL;
{
char *key = NULL;
char *value = NULL;
@@
-121,7
+121,7
@@
DEF_TEST(success)
}
/* pick the other half */
}
/* pick the other half */
- for (i = STATIC_ARRAY_SIZE (cases) / 2; i < STATIC_ARRAY_SIZE (cases); i++)
+ for (
size_t
i = STATIC_ARRAY_SIZE (cases) / 2; i < STATIC_ARRAY_SIZE (cases); i++)
{
char *key = NULL;
char *value = NULL;
{
char *key = NULL;
char *value = NULL;