1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Modifications to avoid unsigned/signed comparisons in various files. (CVS 5914)

FossilOrigin-Name: 8009220c36635dd9b6efea7dc13281ca9625c40a
This commit is contained in:
danielk1977
2008-11-17 19:18:54 +00:00
parent 234329761a
commit 00e136135e
21 changed files with 106 additions and 115 deletions

View File

@@ -16,7 +16,7 @@
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.92 2008/10/13 15:35:09 drh Exp $
** $Id: date.c,v 1.93 2008/11/17 19:18:55 danielk1977 Exp $
**
** SQLite processes all times and dates as Julian Day numbers. The
** dates and times are stored as the number of days since noon
@@ -521,7 +521,7 @@ static int parseModifier(const char *zMod, DateTime *p){
double r;
char *z, zBuf[30];
z = zBuf;
for(n=0; n<sizeof(zBuf)-1 && zMod[n]; n++){
for(n=0; n<ArraySize(zBuf)-1 && zMod[n]; n++){
z[n] = tolower(zMod[n]);
}
z[n] = 0;
@@ -889,7 +889,7 @@ static void strftimeFunc(
}
if( n<sizeof(zBuf) ){
z = zBuf;
}else if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){
}else if( n>(u64)db->aLimit[SQLITE_LIMIT_LENGTH] ){
sqlite3_result_error_toobig(context);
return;
}else{