X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcqlutil.c;h=c0c256f03b0baff5a3325725e4ad930c7d982483;hp=2679d72ae3a1923f5b478d334c547254944b814f;hb=dd37dbb261ac22f4d12bae1ec70236f51763051f;hpb=f59fb84215267865b80710429592d7295f9d436d diff --git a/src/cqlutil.c b/src/cqlutil.c index 2679d72..c0c256f 100644 --- a/src/cqlutil.c +++ b/src/cqlutil.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2011 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -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))) {