Replace copy/pasted loop of the "range search" by doing a -1 in the loop
for the "equal" case.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14133 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_debuginfo/storage.c b/coregrind/m_debuginfo/storage.c
index 9d5f4ac..78bcdf6 100644
--- a/coregrind/m_debuginfo/storage.c
+++ b/coregrind/m_debuginfo/storage.c
@@ -2175,14 +2175,16 @@
         hi = di->cfsi_used-1;
 
    while (lo <= hi) {
+      /* Invariants : hi == cfsi_used-1 || ptr < cfsi_base[hi+1]
+                      lo == 0           || ptr > cfsi_base[lo-1]
+         (the first part of the invariants is similar to considering 
+         that cfsi_base[-1] is 0 and cfsi_base[cfsi_used] is ~0) */
       mid      = (lo + hi) / 2;
       if (ptr < di->cfsi_base[mid]) { hi = mid-1; continue; } 
       if (ptr > di->cfsi_base[mid]) { lo = mid+1; continue; }
-      lo = mid; break;
+      lo = mid+1; break;
    }
 
-   while (lo <= di->cfsi_used-1 && di->cfsi_base[lo] <= ptr)
-      lo++;
 #if 0
    for (mid = 0; mid <= di->cfsi_used-1; mid++)
       if (ptr < di->cfsi_base[mid])