Fossil

Check-in [801a7595]
Login

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

Overview
Comment:Fixing an unnecessary heap accumulation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | annotate_links
Files: files | file ages | folders
SHA1: 801a759589b626f55df684b2a26f4e788c86f58e
User & Date: viriketo 2012-03-18 19:46:45
Context
2012-04-04
16:19
Fixing a jump on uninitialized data on web sbs diff. Noticed after having seen text file corruption in the web SBS, and traced by valgrind. check-in: 92b2a5c3 user: viriketo tags: annotate_links
2012-03-18
19:46
Fixing an unnecessary heap accumulation. check-in: 801a7595 user: viriketo tags: annotate_links
14:53
Making the side-by-side diffs autocalculate the width, by default. check-in: 16397d86 user: viriketo tags: annotate_links
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/diff.c.

1502
1503
1504
1505
1506
1507
1508

1509
1510
1511
1512
1513
1514
1515
      if (width == 0){ /* Autocalculate */
        Blob dump;
        /* Webserver */
        maxwidth = 0;
        blob_zero(&dump);
        sbsDiff(&c, &dump, nContext, width, escHtml);
        width = maxwidth;

      }
      sbsDiff(&c, pOut, nContext, width, escHtml);
    }else{
      int showLn = (diffFlags & DIFF_LINENO)!=0;
      contextDiff(&c, pOut, nContext, showLn, escHtml);
    }
    free(c.aFrom);







>







1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
      if (width == 0){ /* Autocalculate */
        Blob dump;
        /* Webserver */
        maxwidth = 0;
        blob_zero(&dump);
        sbsDiff(&c, &dump, nContext, width, escHtml);
        width = maxwidth;
        blob_reset(&dump);
      }
      sbsDiff(&c, pOut, nContext, width, escHtml);
    }else{
      int showLn = (diffFlags & DIFF_LINENO)!=0;
      contextDiff(&c, pOut, nContext, showLn, escHtml);
    }
    free(c.aFrom);