Revert whitespace fixes to third_party (#501)

This commit is contained in:
Jared Miller 2022-07-22 00:46:07 -04:00 committed by GitHub
parent d4000bb8f7
commit 9de3d8f1e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
365 changed files with 39190 additions and 39211 deletions

View file

@ -214,7 +214,7 @@ sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
}
/*
** Trigger the alarm
** Trigger the alarm
*/
static void sqlite3MallocAlarm(int nByte){
if( mem0.alarmThreshold<=0 ) return;
@ -334,11 +334,11 @@ int sqlite3MallocSize(void *p){
return sqlite3GlobalConfig.m.xSize(p);
}
static int lookasideMallocSize(sqlite3 *db, void *p){
#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE
#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE
return p<db->lookaside.pMiddle ? db->lookaside.szTrue : LOOKASIDE_SMALL;
#else
return db->lookaside.szTrue;
#endif
#endif
}
int sqlite3DbMallocSize(sqlite3 *db, void *p){
assert( p!=0 );
@ -479,7 +479,7 @@ void *sqlite3Realloc(void *pOld, u64 nBytes){
sqlite3_mutex_enter(mem0.mutex);
sqlite3StatusHighwater(SQLITE_STATUS_MALLOC_SIZE, (int)nBytes);
nDiff = nNew - nOld;
if( nDiff>0 && (nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED)) >=
if( nDiff>0 && (nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED)) >=
mem0.alarmThreshold-nDiff ){
sqlite3MallocAlarm(nDiff);
if( mem0.hardLimit>0 && nUsed >= mem0.hardLimit - nDiff ){
@ -527,7 +527,7 @@ void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
/*
** Allocate and zero memory.
*/
*/
void *sqlite3MallocZero(u64 n){
void *p = sqlite3Malloc(n);
if( p ){
@ -557,13 +557,13 @@ static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n){
assert( db!=0 );
p = sqlite3Malloc(n);
if( !p ) sqlite3OomFault(db);
sqlite3MemdebugSetType(p,
sqlite3MemdebugSetType(p,
(db->lookaside.bDisable==0) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP);
return p;
}
/*
** Allocate memory, either lookaside (if possible) or heap.
** Allocate memory, either lookaside (if possible) or heap.
** If the allocation fails, set the mallocFailed flag in
** the connection pointer.
**
@ -599,7 +599,7 @@ void *sqlite3DbMallocRawNN(sqlite3 *db, u64 n){
assert( db->pnBytesFreed==0 );
if( n>db->lookaside.sz ){
if( !db->lookaside.bDisable ){
db->lookaside.anStat[1]++;
db->lookaside.anStat[1]++;
}else if( db->mallocFailed ){
return 0;
}
@ -703,9 +703,9 @@ void *sqlite3DbReallocOrFree(sqlite3 *db, void *p, u64 n){
}
/*
** Make a copy of a string in memory obtained from sqliteMalloc(). These
** Make a copy of a string in memory obtained from sqliteMalloc(). These
** functions call sqlite3MallocRaw() directly instead of sqliteMalloc(). This
** is because when memory debugging is turned on, these two functions are
** is because when memory debugging is turned on, these two functions are
** called via macros that record the current file and line number in the
** ThreadData structure.
*/
@ -804,20 +804,20 @@ static SQLITE_NOINLINE int apiHandleError(sqlite3 *db, int rc){
}
/*
** This function must be called before exiting any API function (i.e.
** This function must be called before exiting any API function (i.e.
** returning control to the user) that has called sqlite3_malloc or
** sqlite3_realloc.
**
** The returned value is normally a copy of the second argument to this
** function. However, if a malloc() failure has occurred since the previous
** invocation SQLITE_NOMEM is returned instead.
** invocation SQLITE_NOMEM is returned instead.
**
** If an OOM as occurred, then the connection error-code (the value
** returned by sqlite3_errcode()) is set to SQLITE_NOMEM.
*/
int sqlite3ApiExit(sqlite3* db, int rc){
/* If the db handle must hold the connection handle mutex here.
** Otherwise the read (and possible write) of db->mallocFailed
** Otherwise the read (and possible write) of db->mallocFailed
** is unsafe, as is the call to sqlite3Error().
*/
assert( db!=0 );