Fossil SCM
Delta checksum verification is disabled by default, for better performance. It can be reenabled using -DFOSSIL_ENABLE_DELTA_CKSUM_TEST.
Commit
d3a46b2a45b92bbcd196ab78fd22426ce9331e8d77a4c7673cdbb4c179c5b596
Parent
a73ed0d2f5091cf…
2 files changed
+2
-2
+2
-2
+2
-2
| --- src/delta.c | ||
| +++ src/delta.c | ||
| @@ -571,11 +571,11 @@ | ||
| 571 | 571 | int lenDelta, /* Length of the delta */ |
| 572 | 572 | char *zOut /* Write the output into this preallocated buffer */ |
| 573 | 573 | ){ |
| 574 | 574 | unsigned int limit; |
| 575 | 575 | unsigned int total = 0; |
| 576 | -#ifndef FOSSIL_OMIT_DELTA_CKSUM_TEST | |
| 576 | +#ifdef FOSSIL_ENABLE_DELTA_CKSUM_TEST | |
| 577 | 577 | char *zOrigOut = zOut; |
| 578 | 578 | #endif |
| 579 | 579 | |
| 580 | 580 | limit = getInt(&zDelta, &lenDelta); |
| 581 | 581 | if( *zDelta!='\n' ){ |
| @@ -628,11 +628,11 @@ | ||
| 628 | 628 | break; |
| 629 | 629 | } |
| 630 | 630 | case ';': { |
| 631 | 631 | zDelta++; lenDelta--; |
| 632 | 632 | zOut[0] = 0; |
| 633 | -#ifndef FOSSIL_OMIT_DELTA_CKSUM_TEST | |
| 633 | +#ifdef FOSSIL_ENABLE_DELTA_CKSUM_TEST | |
| 634 | 634 | if( cnt!=checksum(zOrigOut, total) ){ |
| 635 | 635 | /* ERROR: bad checksum */ |
| 636 | 636 | return -1; |
| 637 | 637 | } |
| 638 | 638 | #endif |
| 639 | 639 |
| --- src/delta.c | |
| +++ src/delta.c | |
| @@ -571,11 +571,11 @@ | |
| 571 | int lenDelta, /* Length of the delta */ |
| 572 | char *zOut /* Write the output into this preallocated buffer */ |
| 573 | ){ |
| 574 | unsigned int limit; |
| 575 | unsigned int total = 0; |
| 576 | #ifndef FOSSIL_OMIT_DELTA_CKSUM_TEST |
| 577 | char *zOrigOut = zOut; |
| 578 | #endif |
| 579 | |
| 580 | limit = getInt(&zDelta, &lenDelta); |
| 581 | if( *zDelta!='\n' ){ |
| @@ -628,11 +628,11 @@ | |
| 628 | break; |
| 629 | } |
| 630 | case ';': { |
| 631 | zDelta++; lenDelta--; |
| 632 | zOut[0] = 0; |
| 633 | #ifndef FOSSIL_OMIT_DELTA_CKSUM_TEST |
| 634 | if( cnt!=checksum(zOrigOut, total) ){ |
| 635 | /* ERROR: bad checksum */ |
| 636 | return -1; |
| 637 | } |
| 638 | #endif |
| 639 |
| --- src/delta.c | |
| +++ src/delta.c | |
| @@ -571,11 +571,11 @@ | |
| 571 | int lenDelta, /* Length of the delta */ |
| 572 | char *zOut /* Write the output into this preallocated buffer */ |
| 573 | ){ |
| 574 | unsigned int limit; |
| 575 | unsigned int total = 0; |
| 576 | #ifdef FOSSIL_ENABLE_DELTA_CKSUM_TEST |
| 577 | char *zOrigOut = zOut; |
| 578 | #endif |
| 579 | |
| 580 | limit = getInt(&zDelta, &lenDelta); |
| 581 | if( *zDelta!='\n' ){ |
| @@ -628,11 +628,11 @@ | |
| 628 | break; |
| 629 | } |
| 630 | case ';': { |
| 631 | zDelta++; lenDelta--; |
| 632 | zOut[0] = 0; |
| 633 | #ifdef FOSSIL_ENABLE_DELTA_CKSUM_TEST |
| 634 | if( cnt!=checksum(zOrigOut, total) ){ |
| 635 | /* ERROR: bad checksum */ |
| 636 | return -1; |
| 637 | } |
| 638 | #endif |
| 639 |
+2
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -949,12 +949,12 @@ | ||
| 949 | 949 | fusefs_lib_version()); |
| 950 | 950 | #endif |
| 951 | 951 | #if defined(FOSSIL_DEBUG) |
| 952 | 952 | blob_append(pOut, "FOSSIL_DEBUG\n", -1); |
| 953 | 953 | #endif |
| 954 | -#if defined(FOSSIL_OMIT_DELTA_CKSUM_TEST) | |
| 955 | - blob_append(pOut, "FOSSIL_OMIT_DELTA_CKSUM_TEST\n", -1); | |
| 954 | +#if defined(FOSSIL_ENABLE_DELTA_CKSUM_TEST) | |
| 955 | + blob_append(pOut, "FOSSIL_ENABLE_DELTA_CKSUM_TEST\n", -1); | |
| 956 | 956 | #endif |
| 957 | 957 | #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) |
| 958 | 958 | blob_append(pOut, "FOSSIL_ENABLE_LEGACY_MV_RM\n", -1); |
| 959 | 959 | #endif |
| 960 | 960 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 961 | 961 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -949,12 +949,12 @@ | |
| 949 | fusefs_lib_version()); |
| 950 | #endif |
| 951 | #if defined(FOSSIL_DEBUG) |
| 952 | blob_append(pOut, "FOSSIL_DEBUG\n", -1); |
| 953 | #endif |
| 954 | #if defined(FOSSIL_OMIT_DELTA_CKSUM_TEST) |
| 955 | blob_append(pOut, "FOSSIL_OMIT_DELTA_CKSUM_TEST\n", -1); |
| 956 | #endif |
| 957 | #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) |
| 958 | blob_append(pOut, "FOSSIL_ENABLE_LEGACY_MV_RM\n", -1); |
| 959 | #endif |
| 960 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 961 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -949,12 +949,12 @@ | |
| 949 | fusefs_lib_version()); |
| 950 | #endif |
| 951 | #if defined(FOSSIL_DEBUG) |
| 952 | blob_append(pOut, "FOSSIL_DEBUG\n", -1); |
| 953 | #endif |
| 954 | #if defined(FOSSIL_ENABLE_DELTA_CKSUM_TEST) |
| 955 | blob_append(pOut, "FOSSIL_ENABLE_DELTA_CKSUM_TEST\n", -1); |
| 956 | #endif |
| 957 | #if defined(FOSSIL_ENABLE_LEGACY_MV_RM) |
| 958 | blob_append(pOut, "FOSSIL_ENABLE_LEGACY_MV_RM\n", -1); |
| 959 | #endif |
| 960 | #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS) |
| 961 |