Skip to content

Commit

Permalink
Fix issue utelle#156 ...
Browse files Browse the repository at this point in the history
... and clean up some more trailing whitespace
  • Loading branch information
utelle committed May 30, 2024
1 parent 731f548 commit c95bd21
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 125 deletions.
4 changes: 2 additions & 2 deletions src/codecext.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,15 +414,15 @@ sqlite3_rekey_v2(sqlite3* db, const char* zDbName, const void* zKey, int nKey)

if ((zKey == NULL || nKey == 0) && (codec == NULL || !sqlite3mcIsEncrypted(codec)))
{
/* Database not encrypted and key not specified, therefore do nothing */
/* Database not encrypted and key not specified, therefore do nothing */
return SQLITE_OK;
}

sqlite3_mutex_enter(db->mutex);

if (codec == NULL || !sqlite3mcIsEncrypted(codec))
{
/* Database not encrypted, but key specified, therefore encrypt database */
/* Database not encrypted, but key specified, therefore encrypt database */
if (codec == NULL)
{
codec = (Codec*) sqlite3_malloc(sizeof(Codec));
Expand Down
16 changes: 8 additions & 8 deletions src/extensionfunctions.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Original code 2006 June 05 by relicoder.
#define HAVE_ISBLANK 1
#endif
#define SQLITE_SOUNDEX 1
#define HAVE_TRIM 1 /* LMH 2007-03-25 if sqlite has trim functions */
#define HAVE_TRIM 1 /* LMH 2007-03-25 if sqlite has trim functions */

#ifdef COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE
#include "sqlite3ext.h"
Expand All @@ -139,7 +139,7 @@ SQLITE_EXTENSION_INIT1
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <errno.h> /* LMH 2007-03-25 */
#include <errno.h> /* LMH 2007-03-25 */

#include <stdlib.h>
#include <assert.h>
Expand Down Expand Up @@ -1508,22 +1508,22 @@ static void modeIterate(void* e, i64 c, void* pp){
if( 0==p->is_double ){
ei = *(int*)(e);

if( p->mcnt==c ){
if( p->mcnt==c ){
++p->mn;
}else if( p->mcnt<c ){
p->riM = ei;
p->mcnt = c;
p->mn=1;
p->mn=1;
}
}else{
ed = *(double*)(e);

if( p->mcnt==c ){
if( p->mcnt==c ){
++p->mn;
}else if(p->mcnt<c){
p->rdM = ed;
p->mcnt = c;
p->mn=1;
p->mn=1;
}
}
}
Expand Down Expand Up @@ -1601,9 +1601,9 @@ static void _medianFinalize(sqlite3_context *context){

if( 0==p->is_double )
if( 1==p->mn )
sqlite3_result_int64(context, p->riM);
sqlite3_result_int64(context, p->riM);
else
sqlite3_result_double(context, p->riM*1.0/p->mn);
sqlite3_result_double(context, p->riM*1.0/p->mn);
else
sqlite3_result_double(context, p->rdM/p->mn);
}
Expand Down
32 changes: 16 additions & 16 deletions src/md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ static void MD5_Final(unsigned char *result, MD5_CTX *ctx);
* architectures that lack an AND-NOT instruction, just like in Colin Plumb's
* implementation.
*/
#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
#define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y))))
#define H(x, y, z) (((x) ^ (y)) ^ (z))
#define H2(x, y, z) ((x) ^ ((y) ^ (z)))
#define I(x, y, z) ((y) ^ ((x) | ~(z)))
#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
#define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y))))
#define H(x, y, z) (((x) ^ (y)) ^ (z))
#define H2(x, y, z) ((x) ^ ((y) ^ (z)))
#define I(x, y, z) ((y) ^ ((x) | ~(z)))

/*
* The MD5 transformation for all four rounds.
*/
#define STEP(f, a, b, c, d, x, t, s) \
(a) += f((b), (c), (d)) + (x) + (t); \
(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
(a) += (b);
(a) += f((b), (c), (d)) + (x) + (t); \
(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
(a) += (b);

/*
* SET reads 4 input bytes in little-endian byte order and stores them
Expand All @@ -84,18 +84,18 @@ static void MD5_Final(unsigned char *result, MD5_CTX *ctx);
*/
#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
#define SET(n) \
(*(MD5_u32plus *)&ptr[(n) * 4])
(*(MD5_u32plus *)&ptr[(n) * 4])
#define GET(n) \
SET(n)
SET(n)
#else
#define SET(n) \
(ctx->block[(n)] = \
(MD5_u32plus)ptr[(n) * 4] | \
((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
(ctx->block[(n)] = \
(MD5_u32plus)ptr[(n) * 4] | \
((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
#define GET(n) \
(ctx->block[(n)])
(ctx->block[(n)])
#endif

/*
Expand Down
Loading

0 comments on commit c95bd21

Please sign in to comment.