aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/malloc.c6
-rw-r--r--src/sqliteInt.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/malloc.c b/src/malloc.c
index 0aa348b2c..36f0faefe 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -12,7 +12,7 @@
**
** Memory allocation functions used throughout sqlite.
**
-** $Id: malloc.c,v 1.24 2008/06/23 11:11:36 danielk1977 Exp $
+** $Id: malloc.c,v 1.25 2008/06/23 14:03:45 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -349,7 +349,7 @@ void sqlite3ScratchFree(void *p){
}
}else{
int i;
- i = p - sqlite3Config.pScratch;
+ i = (u8 *)p - (u8 *)sqlite3Config.pScratch;
i /= sqlite3Config.szScratch;
assert( i>=0 && i<sqlite3Config.nScratch );
sqlite3_mutex_enter(mem0.mutex);
@@ -428,7 +428,7 @@ void sqlite3PageFree(void *p){
** in the mem0.aPageFree[] array.
*/
int i;
- i = p - sqlite3Config.pPage;
+ i = (u8 *)p - (u8 *)sqlite3Config.pPage;
i /= sqlite3Config.szPage;
assert( i>=0 && i<sqlite3Config.nPage );
sqlite3_mutex_enter(mem0.mutex);
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index bc2863575..999d855de 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.723 2008/06/23 09:50:52 danielk1977 Exp $
+** @(#) $Id: sqliteInt.h,v 1.724 2008/06/23 14:03:45 danielk1977 Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@@ -2214,7 +2214,7 @@ CollSeq *sqlite3BinaryCompareCollSeq(Parse *, Expr *, Expr *);
void sqlite3EndBenignMalloc(void);
#else
#define sqlite3BeginBenignMalloc()
- #define sqlite3FaultEndBenign()
+ #define sqlite3EndBenignMalloc()
#endif
#define IN_INDEX_ROWID 1