diff options
author | David Robillard <d@drobilla.net> | 2012-01-31 22:28:18 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-01-31 22:28:18 +0000 |
commit | fe3491419b084c2d41ad9f29274325e6c0043856 (patch) | |
tree | e50dcaea6879029f2a80f3b8884a36620ecea55d /src/fat_patree.c | |
parent | 86826ae6733119d462be9f3642161db895756643 (diff) | |
download | zix-fe3491419b084c2d41ad9f29274325e6c0043856.tar.gz zix-fe3491419b084c2d41ad9f29274325e6c0043856.tar.bz2 zix-fe3491419b084c2d41ad9f29274325e6c0043856.zip |
Windows/Visual C++ portability.
git-svn-id: http://svn.drobilla.net/zix/trunk@51 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'src/fat_patree.c')
-rw-r--r-- | src/fat_patree.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/fat_patree.c b/src/fat_patree.c index 278da2a..454cfba 100644 --- a/src/fat_patree.c +++ b/src/fat_patree.c @@ -17,7 +17,6 @@ #define _XOPEN_SOURCE 500 #include <assert.h> -#include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -85,15 +84,16 @@ patree_find_edge(ZixFatPatreeNode* n, uint8_t c, n_edges_t* index) static void patree_add_edge(ZixFatPatreeNode* n, - char* str, - char* first, - char* last) + char* str, + char* first, + char* last) { assert(last >= first); const int index = (uint8_t)first[0]; assert(!n->children[index]); - ZixFatPatreeNode* new_node = malloc(sizeof(ZixFatPatreeNode)); + ZixFatPatreeNode* new_node = (ZixFatPatreeNode*)malloc( + sizeof(ZixFatPatreeNode)); n->children[index] = new_node; n->children[index]->label_first = first; n->children[index]->label_last = last; @@ -112,7 +112,8 @@ patree_split_edge(ZixFatPatreeNode* child, char* const last = child->label_last; assert(last >= first); - ZixFatPatreeNode* new_node = malloc(sizeof(ZixFatPatreeNode)); + ZixFatPatreeNode* new_node = (ZixFatPatreeNode*)malloc( + sizeof(ZixFatPatreeNode)); new_node->label_first = first; new_node->label_last = last; new_node->str = child->str; |