improve stack allocation
This commit is contained in:
parent
b394be57cb
commit
d02e16a65c
2 changed files with 19 additions and 5 deletions
|
@ -483,3 +483,13 @@
|
||||||
1400829117,12258758.55,4129968.45,59074.70
|
1400829117,12258758.55,4129968.45,59074.70
|
||||||
1400829143,12339827.27,4775224.01,55924.05
|
1400829143,12339827.27,4775224.01,55924.05
|
||||||
1400831278,11421287.15,4742488.93,39945.75
|
1400831278,11421287.15,4742488.93,39945.75
|
||||||
|
1400832805,11676305.28,4832961.50,58254.22
|
||||||
|
1400832811,11785948.52,4137657.27,45590.26
|
||||||
|
1400832831,11918383.46,4859275.06,47662.55
|
||||||
|
1400832837,11650937.22,4734982.85,61680.94
|
||||||
|
1400832892,11728021.34,4274247.24,45590.26
|
||||||
|
1400832912,11580034.68,4752494.99,62601.55
|
||||||
|
1400833017,11890578.32,4501803.27,29330.80
|
||||||
|
1400833024,11715363.55,4726544.41,59074.70
|
||||||
|
1400833045,11813359.08,4828190.72,53092.46
|
||||||
|
1400833051,11082009.03,4721512.49,62601.55
|
||||||
|
|
Can't render this file because it has a wrong number of fields in line 447.
|
16
src/node.c
16
src/node.c
|
@ -261,11 +261,12 @@ node * r3_tree_matchl(const node * n, char * path, int path_len, match_entry * e
|
||||||
int i;
|
int i;
|
||||||
int ov_cnt;
|
int ov_cnt;
|
||||||
int restlen;
|
int restlen;
|
||||||
|
char *pp;
|
||||||
if (n->compare_type == NODE_COMPARE_OPCODE ) {
|
|
||||||
for (i = 0; i < n->edge_len ; i++ ) {
|
|
||||||
char *pp = path;
|
|
||||||
char *pp_end = path + path_len;
|
char *pp_end = path + path_len;
|
||||||
|
|
||||||
|
if (n->compare_type == NODE_COMPARE_OPCODE) {
|
||||||
|
for (i = 0; i < n->edge_len ; i++ ) {
|
||||||
|
pp = path;
|
||||||
e = n->edges[i];
|
e = n->edges[i];
|
||||||
switch(e->opcode) {
|
switch(e->opcode) {
|
||||||
case OP_EXPECT_NOSLASH:
|
case OP_EXPECT_NOSLASH:
|
||||||
|
@ -289,6 +290,7 @@ node * r3_tree_matchl(const node * n, char * path, int path_len, match_entry * e
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// check match
|
||||||
if ( (pp - path) > 0) {
|
if ( (pp - path) > 0) {
|
||||||
restlen = pp_end - pp;
|
restlen = pp_end - pp;
|
||||||
if (entry) {
|
if (entry) {
|
||||||
|
@ -337,10 +339,12 @@ node * r3_tree_matchl(const node * n, char * path, int path_len, match_entry * e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char *substring_start;
|
||||||
|
int substring_length;
|
||||||
for (i = 1; i < rc; i++)
|
for (i = 1; i < rc; i++)
|
||||||
{
|
{
|
||||||
char *substring_start = path + ov[2*i];
|
substring_start = path + ov[2*i];
|
||||||
int substring_length = ov[2*i+1] - ov[2*i];
|
substring_length = ov[2*i+1] - ov[2*i];
|
||||||
// info("%2d: %.*s\n", i, substring_length, substring_start);
|
// info("%2d: %.*s\n", i, substring_length, substring_start);
|
||||||
|
|
||||||
if ( substring_length > 0) {
|
if ( substring_length > 0) {
|
||||||
|
|
Loading…
Reference in a new issue