X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ztest%2Fztest.c;h=6cc2bffefd4ea49a27fb4586ff94497e2ad0d155;hb=5cf76d0f27403990896771b870e833605a7f87f6;hp=bbbb402c871f817a0e8cd83f5eae7c1625782abc;hpb=4e627aa761e0b91b240f703173eeb82462ee8409;p=yaz-moved-to-github.git diff --git a/ztest/ztest.c b/ztest/ztest.c index bbbb402..6cc2bff 100644 --- a/ztest/ztest.c +++ b/ztest/ztest.c @@ -133,12 +133,16 @@ static Odr_int get_term_hit(Z_RPNStructure *s) */ static Odr_int get_hit_count(Z_Query *q) { - Odr_int h = -1; if (q->which == Z_Query_type_1 || q->which == Z_Query_type_101) + { + Odr_int h = -1; h = get_term_hit(q->u.type_1->RPNStructure); - if (h == -1) - h = rand() % 24; - return h; + if (h == -1) + h = rand() % 24; + return h; + } + else + return 24; } /** \brief checks if it's a dummy Slow database