aboutsummaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1997-09-17 01:55:49 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-09-16 21:55:49 -0400
commitc0727e2a06ef34dba8dfeecb09258282cdf80885 (patch)
tree7ecb1f3cbb181d4bc90c2f50e9062be047f4e977 /gcc/libgcc2.c
parent5ae9a80ae180a326c484c58c6216f0112fa67723 (diff)
downloadgcc-c0727e2a06ef34dba8dfeecb09258282cdf80885.zip
gcc-c0727e2a06ef34dba8dfeecb09258282cdf80885.tar.gz
gcc-c0727e2a06ef34dba8dfeecb09258282cdf80885.tar.bz2
* libgcc2.c (find_exception_handler): Not found is -1.
From-SVN: r15504
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 26a0e05..34a6c71 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -3335,7 +3335,7 @@ find_exception_handler (void *pc, exception_table *table)
if (table)
{
int pos;
- int best = 0;
+ int best = -1;
/* We can't do a binary search because the table isn't guaranteed
to be sorted from function to function. */
@@ -3345,15 +3345,15 @@ find_exception_handler (void *pc, exception_table *table)
{
/* This can apply. Make sure it is at least as small as
the previous best. */
- if (best == 0 || (table[pos].end <= table[best].end
- && table[pos].start >= table[best].start))
+ if (best == -1 || (table[pos].end <= table[best].end
+ && table[pos].start >= table[best].start))
best = pos;
}
/* But it is sorted by starting PC within a function. */
else if (best && table[pos].start > pc)
break;
}
- if (best != 0)
+ if (best != -1)
return table[best].exception_handler;
}