Use casts rather than floor(3)
[yaz-moved-to-github.git] / ztest / ztest.c
index 50872a3..2ef8921 100644 (file)
@@ -210,8 +210,8 @@ static void ztest_sleep(double d)
     Sleep( (DWORD) (d * 1000));
 #else
     struct timeval tv;
-    tv.tv_sec = floor(d);
-    tv.tv_usec = (d - floor(d)) * 1000000;
+    tv.tv_sec = d;
+    tv.tv_usec = (d - (long) d) * 1000000;
     select(0, 0, 0, 0, &tv);
 #endif
 }
@@ -253,7 +253,7 @@ Z_OtherInformation *build_facet_response(ODR odr, Z_FacetList *facet_list) {
     for (index = 0; index < facet_list->num; index++) {
         struct yaz_facet_attr attrvalues;
         yaz_facet_attr_init(&attrvalues);
-        attrvalues.limit = 10;
+        attrvalues.limit = 0;
         yaz_facet_attr_get_z_attributes(facet_list->elements[index]->attributes,
                                         &attrvalues);
         yaz_log(YLOG_LOG, "Attributes: %s %d ", attrvalues.useattr, attrvalues.limit);