SQLite

Check-in [a62ba58c73]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a real bug (in test code) that was introduced while trying to eliminate harmless compiler warnings from OpenBSD (see check-in [10321910990195878c]).
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a62ba58c737656fae620d9cdaaae299104ac06f6
User & Date: drh 2015-02-26 16:32:33.621
Context
2015-02-26
16:40
Update a requirements mark to reflect a change of wording in the documentation. No changes to code. (check-in: 3038d0169b user: drh tags: trunk)
16:32
Fix a real bug (in test code) that was introduced while trying to eliminate harmless compiler warnings from OpenBSD (see check-in [10321910990195878c]). (check-in: a62ba58c73 user: drh tags: trunk)
02:33
Simplifications to the description of the nByte parameter to sqlite3_prepare() and friends. (check-in: 4bee8295e3 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/tclsqlite.c.
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
*/
static void MD5DigestToBase10x8(unsigned char digest[16], char zDigest[50]){
  int i, j;
  unsigned int x;
  for(i=j=0; i<16; i+=2){
    x = digest[i]*256 + digest[i+1];
    if( i>0 ) zDigest[j++] = '-';
    sqlite3_snprintf(16-j, &zDigest[j], "%05u", x);
    j += 5;
  }
  zDigest[j] = 0;
}

/*
** A TCL command for md5.  The argument is the text to be hashed.  The







|







3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
*/
static void MD5DigestToBase10x8(unsigned char digest[16], char zDigest[50]){
  int i, j;
  unsigned int x;
  for(i=j=0; i<16; i+=2){
    x = digest[i]*256 + digest[i+1];
    if( i>0 ) zDigest[j++] = '-';
    sqlite3_snprintf(50-j, &zDigest[j], "%05u", x);
    j += 5;
  }
  zDigest[j] = 0;
}

/*
** A TCL command for md5.  The argument is the text to be hashed.  The