Selaa lähdekoodia

[Refactor] Fix misspelled variable name in cdb_make.c

tags/1.6.2
Alexander Moisseev 6 vuotta sitten
vanhempi
commit
0a5db37306
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4
    4
      contrib/cdb/cdb_make.c

+ 4
- 4
contrib/cdb/cdb_make.c Näytä tiedosto

struct cdb_rl *rl; struct cdb_rl *rl;
struct cdb_rec *rp, *rs; struct cdb_rec *rp, *rs;
unsigned r; unsigned r;
int seeked = 0;
int sought = 0;
int ret = 0; int ret = 0;
for (rl = cdbmp->cdb_rec[hval & 255]; rl; rl = rl->next) for (rl = cdbmp->cdb_rec[hval & 255]; rl; rl = rl->next)
for (rs = rl->rec, rp = rs + rl->cnt; --rp >= rs;) { for (rs = rl->rec, rp = rs + rl->cnt; --rp >= rs;) {
* smarter match() that looks into cdb_buf too, but * smarter match() that looks into cdb_buf too, but
* most of a time here spent in finding hash values * most of a time here spent in finding hash values
* (above), not keys */ * (above), not keys */
if (!seeked && _cdb_make_flush (cdbmp) < 0)
if (!sought && _cdb_make_flush (cdbmp) < 0)
return -1; return -1;
seeked = 1;
sought = 1;
r = match (cdbmp, rp->rpos, key, klen); r = match (cdbmp, rp->rpos, key, klen);
if (!r) if (!r)
continue; continue;
--rl->cnt; --rl->cnt;
--cdbmp->cdb_rcnt; --cdbmp->cdb_rcnt;
} }
finish: if (seeked && lseek (cdbmp->cdb_fd, cdbmp->cdb_dpos, SEEK_SET) < 0)
finish: if (sought && lseek (cdbmp->cdb_fd, cdbmp->cdb_dpos, SEEK_SET) < 0)
return -1; return -1;
return ret; return ret;
} }

Loading…
Peruuta
Tallenna