From: Sebastian B. <sb...@us...> - 2014-01-19 18:55:12
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25520 Modified Files: index_external.c Log Message: Use bnode_compare_string() instead of manually reading and comparing the string. Index: index_external.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/index_external.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- index_external.c 19 Jan 2014 18:54:47 -0000 1.49 +++ index_external.c 19 Jan 2014 18:55:10 -0000 1.50 @@ -745,7 +745,6 @@ int index; int text_len; struct bnode_element *be; - char *str; if (!iter) { @@ -786,11 +785,10 @@ index = 0; } + be = bnode_get_ith_element_of_node(idx, iter->node, index); - if (!(str = bnode_read_string(idx, be))) + if (!bnode_compare_string(idx, be, text, &cmp)) goto done; - - cmp = strncmp(text, str, text_len); if (cmp) goto done; iter->index = index; iter->did = be->did; |