aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-18 13:39:52 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-18 13:39:52 +0100
commit48de7ad408a36a75c58a506ca51efd37a34f8b6e (patch)
tree797c2f903d23a2cf6a9a815518584a3e298dc432 /src/libutil
parent48d2be7a716d333c7bb0d5dff59f69918357fcde (diff)
downloadrspamd-48de7ad408a36a75c58a506ca51efd37a34f8b6e.tar.gz
rspamd-48de7ad408a36a75c58a506ca51efd37a34f8b6e.zip
Fix some issues.
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/radix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libutil/radix.c b/src/libutil/radix.c
index 79175b9f4..99e25d0ba 100644
--- a/src/libutil/radix.c
+++ b/src/libutil/radix.c
@@ -413,7 +413,7 @@ radix_compare_compressed (struct radix_compressed_node *node,
nk = node->d.s.key + shift;
k = key + shift;
- bit = 1 << 7;
+ bit = 1U << 7;
while (rbits > 0) {
if ((*nk & bit) != (*k & bit)) {
@@ -488,7 +488,7 @@ radix_uncompress_path (radix_compressed_t *tree,
guint levels_uncompress)
{
guint8 *nkey = node->d.s.key + start_level / NBBY;
- guint8 bit = 1 << (7 - start_level % NBBY);
+ guint8 bit = 1U << (7 - start_level % NBBY);
struct radix_compressed_node *leaf, *next;
/* Make compressed leaf */
@@ -522,7 +522,7 @@ radix_uncompress_path (radix_compressed_t *tree,
bit >>= 1;
if (bit == 0) {
nkey ++;
- bit = 1 << 7;
+ bit = 1U << 7;
}
node = next;
levels_uncompress --;
@@ -659,7 +659,7 @@ radix_uncompress_node (radix_compressed_t *tree,
if (bit == 0) {
k ++;
nkey ++;
- bit = 1 << 7;
+ bit = 1U << 7;
kremain --;
}
}
@@ -735,7 +735,7 @@ radix_insert_compressed (radix_compressed_t * tree,
gsize kremain = keylen;
uintptr_t oldval = RADIX_NO_VALUE;
- bit = 1 << 7;
+ bit = 1U << 7;
node = tree->root;
g_assert (keybits >= masklen);
@@ -769,7 +769,7 @@ radix_insert_compressed (radix_compressed_t * tree,
bit >>= 1;
if (bit == 0) {
k ++;
- bit = 1 << 7;
+ bit = 1U << 7;
kremain --;
}
cur_level ++;
@@ -849,7 +849,7 @@ radix_tree_create_compressed (void)
{
radix_compressed_t *tree;
- tree = g_slice_alloc (sizeof (radix_tree_t));
+ tree = g_slice_alloc (sizeof (*tree));
if (tree == NULL) {
return NULL;
}