From: Dennis Schafroth Date: Thu, 15 Jul 2010 12:39:35 +0000 (+0200) Subject: Small reorder of code line for cosmetic X-Git-Tag: v4.0.12~52 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=d2f977c26e0b16c544b69339c34ca9300b55b749;p=yaz-moved-to-github.git Small reorder of code line for cosmetic --- diff --git a/src/pquery.c b/src/pquery.c index 63aa7b9..3b416bb 100644 --- a/src/pquery.c +++ b/src/pquery.c @@ -119,7 +119,7 @@ static int lex(struct yaz_pqf_parser *li) return li->query_look = query_token(li); } -static int escape_string(char *out_buf, const char *in, int len) +int escape_string(char *out_buf, const char *in, int len) { char *out = out_buf; @@ -307,11 +307,11 @@ static Z_AttributesPlusTerm *rpn_term_attributes(struct yaz_pqf_parser *li, ODR Z_Term *term; zapt = (Z_AttributesPlusTerm *)odr_malloc(o, sizeof(*zapt)); - term_octet = (Odr_oct *)odr_malloc(o, sizeof(*term_octet)); term = (Z_Term *)odr_malloc(o, sizeof(*term)); zapt->term = term; zapt->attributes = attributes; + term_octet = (Odr_oct *)odr_malloc(o, sizeof(*term_octet)); term_octet->buf = (unsigned char *)odr_malloc(o, 1 + li->lex_len); term_octet->size = term_octet->len = escape_string((char *) (term_octet->buf), li->lex_buf, li->lex_len);