fix divide by zero error on debugging message if trail was empty

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@71 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2001-06-08 19:33:16 +00:00
parent 835f315727
commit 136a4d4a67

View File

@ -1851,11 +1851,12 @@ sweep_trail(choiceptr gc_B, tr_fr_ptr old_TR)
}
new_TR = dest;
if (is_gc_verbose()) {
YP_fprintf(YP_stderr,
"[GC] Trail: discarded %d (%ld%%) cells out of %ld\n",
discard_trail_entries,
(unsigned long int)(discard_trail_entries*100/(old_TR-(tr_fr_ptr)TrailBase)),
(unsigned long int)(old_TR-(tr_fr_ptr)TrailBase));
if (old_TR != (tr_fr_ptr)TrailBase)
YP_fprintf(YP_stderr,
"[GC] Trail: discarded %d (%ld%%) cells out of %ld\n",
discard_trail_entries,
(unsigned long int)(discard_trail_entries*100/(old_TR-(tr_fr_ptr)TrailBase)),
(unsigned long int)(old_TR-(tr_fr_ptr)TrailBase));
#ifdef DEBUG
if (hp_entrs > 0)
YP_fprintf(YP_stderr,