[dovecot-cvs] dovecot/src/lib bsearch-insert-pos.c,1.2,1.3
tss at dovecot.org
tss at dovecot.org
Thu Mar 15 19:04:44 EET 2007
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv18020/lib
Modified Files:
bsearch-insert-pos.c
Log Message:
Optimization. Patch by Max Kellermann
Index: bsearch-insert-pos.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/bsearch-insert-pos.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- bsearch-insert-pos.c 15 Mar 2007 17:02:04 -0000 1.2
+++ bsearch-insert-pos.c 15 Mar 2007 17:04:42 -0000 1.3
@@ -28,11 +28,8 @@
}
}
- if (idx < nmemb) {
- p = CONST_PTR_OFFSET(base, idx * size);
- if (cmp(key, p) > 0)
- ++idx;
- }
+ if (left_idx > idx)
+ idx++;
*idx_r = idx;
return FALSE;
More information about the dovecot-cvs
mailing list