From e5022b9c2a4e7d7ad55295783dc81fbd890b7f99 Mon Sep 17 00:00:00 2001 From: vsc Date: Wed, 30 Jan 2002 00:26:43 +0000 Subject: [PATCH] fix recordifnot git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@336 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/dbase.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/C/dbase.c b/C/dbase.c index 1342b910f..0a64876d1 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -379,10 +379,10 @@ static CELL *linkcells(register CELL *to, Int n) static Int cmpclls(CELL *a,CELL *b,Int n) { - while (n-- >= 0) - if(*a++ != *b++) return 0; - - return 1; + while (n-- > 0) { + if(*a++ != *b++) return FALSE; + } + return TRUE; } int DBTrailOverflow(void) @@ -1103,7 +1103,7 @@ check_if_wvars(DBRef p, unsigned int NOfCells, CELL *BTptr) p = NextDBRef(p); if (p == NIL) return (p); - memptr = CellPtr(p->Contents); + memptr = CellPtr(&(p->Contents)); if (NOfCells == p->NOfCells && cmpclls(memptr, BTptr, NOfCells)) return (p); @@ -1120,7 +1120,7 @@ scheckcells(int NOfCells, register CELL *m1, register CELL *m2, link_entry *lp, CELL base = Unsigned(m1 + 1); link_entry *lp1; - while (NOfCells-- >= 0) { + while (NOfCells-- > 0) { Register CELL r1, r2; r1 = *m1++;