Fossil SCM
Avoid a valgrind warning in the side-by-side diff logic.
Commit
9262546e4381bed65312dad0de503fff9a194898
Parent
43631b087ba4fb3…
1 file changed
+1
+1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -881,10 +881,11 @@ | ||
| 881 | 881 | int m, ma, mb;/* Number of lines to output */ |
| 882 | 882 | int skip; /* Number of lines to skip */ |
| 883 | 883 | int nChunk = 0; /* Number of chunks of diff output seen so far */ |
| 884 | 884 | SbsLine s; /* Output line buffer */ |
| 885 | 885 | |
| 886 | + memset(&s, 0, sizeof(s)); | |
| 886 | 887 | s.zLine = fossil_malloc( 10*width + 200 ); |
| 887 | 888 | if( s.zLine==0 ) return; |
| 888 | 889 | s.width = width; |
| 889 | 890 | s.escHtml = escHtml; |
| 890 | 891 | s.iStart = -1; |
| 891 | 892 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -881,10 +881,11 @@ | |
| 881 | int m, ma, mb;/* Number of lines to output */ |
| 882 | int skip; /* Number of lines to skip */ |
| 883 | int nChunk = 0; /* Number of chunks of diff output seen so far */ |
| 884 | SbsLine s; /* Output line buffer */ |
| 885 | |
| 886 | s.zLine = fossil_malloc( 10*width + 200 ); |
| 887 | if( s.zLine==0 ) return; |
| 888 | s.width = width; |
| 889 | s.escHtml = escHtml; |
| 890 | s.iStart = -1; |
| 891 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -881,10 +881,11 @@ | |
| 881 | int m, ma, mb;/* Number of lines to output */ |
| 882 | int skip; /* Number of lines to skip */ |
| 883 | int nChunk = 0; /* Number of chunks of diff output seen so far */ |
| 884 | SbsLine s; /* Output line buffer */ |
| 885 | |
| 886 | memset(&s, 0, sizeof(s)); |
| 887 | s.zLine = fossil_malloc( 10*width + 200 ); |
| 888 | if( s.zLine==0 ) return; |
| 889 | s.width = width; |
| 890 | s.escHtml = escHtml; |
| 891 | s.iStart = -1; |
| 892 |