Work around a bug in Borland C. Ticket #3216. (CVS 5406)
FossilOrigin-Name: 2c24e50da6f6c19dee105823125157db73bdd515
diff --git a/src/malloc.c b/src/malloc.c
index 351a38c..ed2bbb3 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -12,7 +12,7 @@
**
** Memory allocation functions used throughout sqlite.
**
-** $Id: malloc.c,v 1.26 2008/07/08 19:34:07 drh Exp $
+** $Id: malloc.c,v 1.27 2008/07/14 12:30:54 drh Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -150,8 +150,10 @@
*/
sqlite3_int64 sqlite3_memory_used(void){
int n, mx;
+ sqlite3_int64 res;
sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, 0);
- return (sqlite3_int64)n;
+ res = (sqlite3_int64)n; /* Work around bug in Borland C. Ticket #3216 */
+ return res;
}
/*
@@ -161,8 +163,10 @@
*/
sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
int n, mx;
+ sqlite3_int64 res;
sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, resetFlag);
- return (sqlite3_int64)mx;
+ res = (sqlite3_int64)n; /* Work around bug in Borland C. Ticket #3216 */
+ return res;
}
/*