~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff-delta.c

Merge Martin gz's tweaks for signed vs unsigned, but tweak them a bit further.

Show diffs side-by-side

added added

removed removed

Lines of Context:
397
397
    stride = RABIN_WINDOW;
398
398
    num_entries = (src->size - 1)  / RABIN_WINDOW;
399
399
    if (max_bytes_to_index > 0) {
400
 
        max_entries = max_bytes_to_index / RABIN_WINDOW;
 
400
        max_entries = (unsigned int) (max_bytes_to_index / RABIN_WINDOW);
401
401
        if (num_entries > max_entries) {
402
402
            /* Limit the max number of matching entries. This reduces the 'best'
403
403
             * possible match, but means we don't consume all of ram.