]> mj.ucw.cz Git - libucw.git/blobdiff - lib/sorter/govern.c
Readding line of makefile lost in merge
[libucw.git] / lib / sorter / govern.c
index 43b1668846fb975c1fb06fdfe415bb38df328586..dbdbd4772ae578cefc6d380f15ad7deff99e972e 100644 (file)
@@ -38,7 +38,7 @@ sorter_speed(struct sort_context *ctx, u64 size)
   if (!size)
     return 0;
   if (!ctx->last_pass_time)
-    return -1;
+    return 0;
   return (uns)((double)size / (1<<20) * 1000 / ctx->last_pass_time);
 }
 
@@ -77,7 +77,7 @@ sbuck_join_to(struct sort_bucket *b, sh_off_t *sizep)
 static sh_off_t
 sbuck_ins_or_join(struct sort_bucket *b, cnode *list_pos, struct sort_bucket *join, sh_off_t join_size)
 {
-  if (join)
+  if (join && join->runs >= 2)
     {
       if (b)
        sbuck_drop(b);