X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fpquery.c;h=002d9eb1b34ffc305805e75a2af07a424b2436ba;hb=d0a4d2462d57a0392daf2eb0dc053d91aff5d285;hp=55eb1d30efcebc020d75333259e8cbedac345dc6;hpb=612ac7d30003582e44d4184c830eee7f1a1a0443;p=yaz-moved-to-github.git diff --git a/src/pquery.c b/src/pquery.c index 55eb1d3..002d9eb 100644 --- a/src/pquery.c +++ b/src/pquery.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -386,9 +386,7 @@ static Z_Operand *rpn_simple(struct yaz_pqf_parser *li, ODR o, return 0; } zo->which = Z_Operand_resultSetId; - zo->u.resultSetId = (char *)odr_malloc(o, li->lex_len+1); - memcpy(zo->u.resultSetId, li->lex_buf, li->lex_len); - zo->u.resultSetId[li->lex_len] = '\0'; + zo->u.resultSetId = odr_strdupn(o, li->lex_buf, li->lex_len); lex(li); break; default: @@ -834,7 +832,7 @@ static Z_FacetField* parse_facet(ODR odr, const char *facet) { YAZ_PQF_Parser pqf_parser = yaz_pqf_create(); struct yaz_pqf_parser *li = pqf_parser; - Odr_oid *attributeSetId; + Odr_oid *attributeSetId = 0; Z_FacetField *facet_field = 0; Z_AttributeList *attribute_list;