[1593] in BarnOwl Developers
[nelhage/barnowl] 2b37be: _owl_dict_find_pos: Clean up binary search.
daemon@ATHENA.MIT.EDU (noreply@github.com)
Thu Oct 29 18:18:32 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@lunatique.mit.edu
X-Barracuda-Envelope-From: noreply@github.com
Date: Tue, 28 Jul 2009 23:53:39 -0700
To: barnowl-dev@mit.edu
From: noreply@github.com
Branch: refs/heads/master
Home: http://github.com/nelhage/barnowl
Commit: 2b37be24365a6f7a551e5e5fa5d7e57f9a5b7d2f
http://github.com/nelhage/barnowl/commit/2b37be24365a6f7a551e5e5fa5d7e57f9a5b7d2f
Author: Anders Kaseorg <andersk@mit.edu>
Date: 2009-07-28 (Tue, 28 Jul 2009)
Changed paths:
M dict.c
Log Message:
-----------
_owl_dict_find_pos: Clean up binary search.
The incomprehensible boolean return expression is better expressed
using control flow; as a happy side effect, this optimizes out an
expected 2 strcmps. Correctly scope variables. Also, don’t use C++
comments in C.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>