Fossil SCM

Wrong parameter type: should be 64 bits otherwise the diffFlags parameter cannot hold all possible bits.

jan.nijtmans 2014-03-03 10:28 diff-eolws
Commit d3f69bd48ec279739a88041de5572bf616f91fe2
1 file changed +2 -2
+2 -2
--- src/diff.c
+++ src/diff.c
@@ -128,15 +128,15 @@
128128
** too long.
129129
**
130130
** Profiling show that in most cases this routine consumes the bulk of
131131
** the CPU time on a diff.
132132
*/
133
-static DLine *break_into_lines(const char *z, int n, int *pnLine, int diffFlags){
133
+static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
134134
int nLine, i, j, k, x;
135135
unsigned int h, h2;
136136
DLine *a;
137
- int ignoreWS = diffFlags & DIFF_IGNORE_EOLWS;
137
+ int ignoreWS = (diffFlags & DIFF_IGNORE_EOLWS)!=0;
138138
139139
/* Count the number of lines. Allocate space to hold
140140
** the returned array.
141141
*/
142142
for(i=j=0, nLine=1; i<n; i++, j++){
143143
--- src/diff.c
+++ src/diff.c
@@ -128,15 +128,15 @@
128 ** too long.
129 **
130 ** Profiling show that in most cases this routine consumes the bulk of
131 ** the CPU time on a diff.
132 */
133 static DLine *break_into_lines(const char *z, int n, int *pnLine, int diffFlags){
134 int nLine, i, j, k, x;
135 unsigned int h, h2;
136 DLine *a;
137 int ignoreWS = diffFlags & DIFF_IGNORE_EOLWS;
138
139 /* Count the number of lines. Allocate space to hold
140 ** the returned array.
141 */
142 for(i=j=0, nLine=1; i<n; i++, j++){
143
--- src/diff.c
+++ src/diff.c
@@ -128,15 +128,15 @@
128 ** too long.
129 **
130 ** Profiling show that in most cases this routine consumes the bulk of
131 ** the CPU time on a diff.
132 */
133 static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
134 int nLine, i, j, k, x;
135 unsigned int h, h2;
136 DLine *a;
137 int ignoreWS = (diffFlags & DIFF_IGNORE_EOLWS)!=0;
138
139 /* Count the number of lines. Allocate space to hold
140 ** the returned array.
141 */
142 for(i=j=0, nLine=1; i<n; i++, j++){
143

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button