From: Martin Mares Date: Fri, 21 Sep 2007 09:14:55 +0000 (+0200) Subject: Do not die on ASSERT when sorting an empty input with custom presorter. X-Git-Tag: holmes-import~506^2~12^2~1 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=f20fee710189d2280e8528520dc9c49f7da2ba59;p=libucw.git Do not die on ASSERT when sorting an empty input with custom presorter. We have test that not only the join bucket is available, but that the join has actually happened, because custom presorters do not implement automatic joining. --- diff --git a/lib/sorter/govern.c b/lib/sorter/govern.c index 43b16688..2d7f4e95 100644 --- a/lib/sorter/govern.c +++ b/lib/sorter/govern.c @@ -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);