From c0727e2a06ef34dba8dfeecb09258282cdf80885 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 17 Sep 1997 01:55:49 +0000 Subject: * libgcc2.c (find_exception_handler): Not found is -1. From-SVN: r15504 --- gcc/libgcc2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/libgcc2.c') 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; } -- cgit v1.1