aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2025-03-24 23:08:40 +0000
committerdrh <>2025-03-24 23:08:40 +0000
commitb0c3118cad42832cf08b3b6fdc2f9b736d73d6ec (patch)
treed63528b38341cd4cc1dbcd758800f0f6f4f45bcb /src
parente6e453def6fc09432a734c82c96f185ed0924bae (diff)
downloadsqlite-b0c3118cad42832cf08b3b6fdc2f9b736d73d6ec.tar.gz
sqlite-b0c3118cad42832cf08b3b6fdc2f9b736d73d6ec.zip
Clarify and reduce redundancy in an assert() in walChecksumBytes().
FossilOrigin-Name: 3c53abf5e6df446d569040042363265737aa10fc8aaa20b31c587100c557c5e7
Diffstat (limited to 'src')
-rw-r--r--src/wal.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wal.c b/src/wal.c
index 7f091a48c..5fe2296d6 100644
--- a/src/wal.c
+++ b/src/wal.c
@@ -871,10 +871,8 @@ static void walChecksumBytes(
s1 = s2 = 0;
}
- assert( nByte>=8 );
- assert( (nByte&0x00000007)==0 );
- assert( nByte<=65536 );
- assert( nByte%4==0 );
+ /* nByte is a multiple of 8 between 8 and 65536 */
+ assert( nByte>=8 && (nByte&7)==0 && nByte<=65536 );
if( !nativeCksum ){
do {