X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcqlutil.c;h=5285a0f590d78266369669e3b7b5d24daf443ca5;hp=f3de006fea93c576477e5f1ade38893eae495bfe;hb=5242cb5a8634bfa38b9333ff7f903e718ac6e292;hpb=7b27a8f378d73a86e8ff5e4fa3285117362481c5 diff --git a/src/cqlutil.c b/src/cqlutil.c index f3de006..5285a0f 100644 --- a/src/cqlutil.c +++ b/src/cqlutil.c @@ -34,7 +34,7 @@ struct cql_node *cql_node_dup(NMEM nmem, struct cql_node *cp) cp->u.st.relation, cp->u.st.term); cn->u.st.modifiers = cql_node_dup(nmem, cp->u.st.modifiers); - cn->u.st.index_uri = cp->u.st.index_uri ? + cn->u.st.index_uri = cp->u.st.index_uri ? nmem_strdup(nmem, cp->u.st.index_uri) : 0; cn->u.st.relation_uri = cp->u.st.relation_uri ? nmem_strdup(nmem, cp->u.st.relation_uri) : 0; @@ -116,7 +116,7 @@ struct cql_node *cql_apply_prefix(NMEM nmem, if (!n->u.st.index_uri && n->u.st.index) { /* not yet resolved.. */ const char *cp = strchr(n->u.st.index, '.'); - if (prefix && cp && + if (prefix && cp && strlen(prefix) == (size_t) (cp - n->u.st.index) && !cql_strncmp(n->u.st.index, prefix, strlen(prefix))) {