From d2f977c26e0b16c544b69339c34ca9300b55b749 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Thu, 15 Jul 2010 14:39:35 +0200 Subject: [PATCH] Small reorder of code line for cosmetic --- src/pquery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 1.7.10.4