Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 436382
Collapse All | Expand All

(-)lbzip2-2.2_orig/src/encode.c (-1 / +5 lines)
Lines 789-796 Link Here
789
  for (a = 0, t = 0; t < nt; t++) {
789
  for (a = 0, t = 0; t < nt; t++) {
790
    /* Find a range of symbols which total count is roughly proportional to one
790
    /* Find a range of symbols which total count is roughly proportional to one
791
       nt-th of all values. */
791
       nt-th of all values. */
792
    for (c = 0, b = a; c * (nt-t) < nm; b++)
792
    c = 0, b = a;
793
    do {
793
      c += s->lookup[0][b];
794
      c += s->lookup[0][b];
795
      b++;
796
    } while (c * (nt-t) < nm);
797
794
    assert(a < b);
798
    assert(a < b);
795
    if (a < b-1 && (2*c - s->lookup[0][b-1]) * (nt-t) > 2*nm) {
799
    if (a < b-1 && (2*c - s->lookup[0][b-1]) * (nt-t) > 2*nm) {
796
      c -= s->lookup[0][--b];
800
      c -= s->lookup[0][--b];

Return to bug 436382