From: Heikki Levanto Date: Mon, 7 Jul 2003 14:56:04 +0000 (+0000) Subject: Fixed a bug in zebrash and a warning in zebraapi X-Git-Tag: ZEBRA.1.3.12~19 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=87c62083368d018a7d159fcfd6fc1c930b02b7e3;p=idzebra-moved-to-github.git Fixed a bug in zebrash and a warning in zebraapi --- diff --git a/index/zebraapi.c b/index/zebraapi.c index 3b62367..9f5886c 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,4 +1,4 @@ -/* $Id: zebraapi.c,v 1.111 2003-07-07 13:55:37 pop Exp $ +/* $Id: zebraapi.c,v 1.112 2003-07-07 14:56:04 heikki Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 Index Data Aps @@ -2107,7 +2107,7 @@ int zebra_search_PQF (ZebraHandle zh, const char *pqf_query, odr_destroy(odr); - yaz_log(LOG_API,"Hits: %d",numhits); + yaz_log(LOG_API,"Hits: %d",hits); if (numhits) *numhits=hits; diff --git a/index/zebrash.c b/index/zebrash.c index b95737a..efa8b2d 100644 --- a/index/zebrash.c +++ b/index/zebrash.c @@ -1,4 +1,4 @@ -/* $Id: zebrash.c,v 1.19 2003-07-04 14:27:19 heikki Exp $ +/* $Id: zebrash.c,v 1.20 2003-07-07 14:56:04 heikki Exp $ Copyright (C) 2002,2003 Index Data Aps @@ -417,14 +417,14 @@ static int cmd_show( char *args[], WRBUF outbuff) int nrecs=defargint(args[2],1); char *setname=defarg(args[3],DEFAULTRESULTSET); int rc=0; + ZebraRetrievalRecord *recs; ODR odr; Z_RecordComposition *pcomp=0; int i; oid_value format; odr=odr_createmem(ODR_ENCODE); - ZebraRetrievalRecord *recs= - odr_malloc(odr,sizeof(ZebraRetrievalRecord)*nrecs); + recs= odr_malloc(odr,sizeof(ZebraRetrievalRecord)*nrecs); rc =z_RecordComposition(odr, &pcomp, 0,"recordComposition"); format=oid_getvalbyname ("xml"); /*FIXME - let the user specify*/ for (i=0;i