Skip to content

Commit 9f2cc1e

Browse files
committed
Drop cruft in db code brought in by 1.8x.
We don't allocate memory to receive data from db, so the cruft left was only accessing db twice for lone lines.
1 parent 31fc24d commit 9f2cc1e

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

common/line.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ db_get(
9292
recno_t l1, l2;
9393
CHAR_T *wp;
9494
size_t wlen;
95-
size_t nlen;
9695

9796
/*
9897
* The underlying recno stuff handles zero by returning NULL, but
@@ -152,8 +151,6 @@ db_get(
152151
ep->c_lno = OOBLNO;
153152

154153
nocache:
155-
nlen = 1024;
156-
retry:
157154
/* Get the line from the underlying database. */
158155
key.data = &lno;
159156
key.size = sizeof(lno);
@@ -169,11 +166,6 @@ err3: if (lenp != NULL)
169166
if (pp != NULL)
170167
*pp = NULL;
171168
return (1);
172-
case 0:
173-
if (data.size > nlen) {
174-
nlen = data.size;
175-
goto retry;
176-
}
177169
}
178170

179171
if (FILE2INT(sp, data.data, data.size, wp, wlen)) {
@@ -544,8 +536,6 @@ db_last(
544536
case 1:
545537
*lnop = 0;
546538
return (0);
547-
case 0:
548-
;
549539
}
550540

551541
memcpy(&lno, key.data, sizeof(lno));

0 commit comments

Comments
 (0)