struct session_database *sdb = client_get_database(cl);
const char *str;
int extend_recs = 0;
- int number;
+ int number = cl->hits - cl->record_offset;
str = session_setting_oneval(sdb, PZ_EXTENDRECS);
if (!str || !*str)
return 0;
yaz_log(YLOG_LOG, "cl=%s Trying to fetch more", client_get_id(cl));
- if (extend_recs > cl->hits)
- extend_recs = cl->hits;
-
- number = extend_recs - cl->record_offset;
+ if (number > extend_recs)
+ number = extend_recs;
if (number > 0)
{
ZOOM_resultset set = cl->resultset;
facet_limits_destroy(cl->facet_limits);
cl->facet_limits = facet_limits_dup(facet_limits);
- yaz_log(YLOG_LOG, "Client %s: CCL query: %s limit: %s", client_get_id(cl), wrbuf_cstr(w_ccl), wrbuf_cstr(w_pqf));
+ yaz_log(YLOG_LOG, "Client %s: CCL query: %s limit: %s",
+ client_get_id(cl), wrbuf_cstr(w_ccl), wrbuf_cstr(w_pqf));
cn = ccl_find_str(ccl_map, wrbuf_cstr(w_ccl), &cerror, &cpos);
ccl_qual_rm(&ccl_map);
if (!cn)
if (!cl->pquery || strcmp(cl->pquery, wrbuf_cstr(w_pqf)))
{
if (cl->pquery)
- session_log(se, YLOG_LOG, "Client %s: Re-search due query/limit change: %s to %s",
+ session_log(se, YLOG_LOG, "Client %s: "
+ "Re-search due query/limit change: %s to %s",
client_get_id(cl), cl->pquery, wrbuf_cstr(w_pqf));
xfree(cl->pquery);
cl->pquery = xstrdup(wrbuf_cstr(w_pqf));
&suggestions->num, 1, '\\', 0);
/* Set up misspelled array */
suggestions->misspelled = (char **)
- nmem_malloc(nmem, suggestions->num * sizeof(**suggestions->misspelled));
+ nmem_malloc(nmem, suggestions->num * sizeof(*suggestions->misspelled));
/* replace = with \0 .. for each item */
for (i = 0; i < suggestions->num; i++)
{