X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Flogic.c;h=be2ec0493162dec09bba9f5b89a388452cba807f;hb=8979547d2f3be2c18f640f3569bd14e778d54de1;hp=57f36b426f143d7ed59131504bf958d5b3774bb6;hpb=31f6b164fd451ef9254545a38e7b6ffc1543854f;p=pazpar2-moved-to-github.git diff --git a/src/logic.c b/src/logic.c index 57f36b4..be2ec04 100644 --- a/src/logic.c +++ b/src/logic.c @@ -1,5 +1,5 @@ /* This file is part of Pazpar2. - Copyright (C) 2006-2009 Index Data + Copyright (C) 2006-2010 Index Data Pazpar2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -92,7 +92,7 @@ static void log_xml_doc(xmlDoc *doc) #endif if (lf && len) { - fwrite(result, 1, len, lf); + (void) fwrite(result, 1, len, lf); fprintf(lf, "\n"); } xmlFree(result); @@ -897,15 +897,15 @@ static int get_mergekey_from_doc(xmlDoc *doc, xmlNode *root, const char *name, service->mergekey_pct, (const char *) value, 0); + if (wrbuf_len(norm_wr) > 0) + wrbuf_puts(norm_wr, " "); wrbuf_puts(norm_wr, name); - wrbuf_puts(norm_wr, "="); while ((norm_str = pp2_relevance_token_next(prt))) { if (*norm_str) { - if (wrbuf_len(norm_wr)) - wrbuf_puts(norm_wr, " "); + wrbuf_puts(norm_wr, " "); wrbuf_puts(norm_wr, norm_str); } }