summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-27 10:13:25 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-27 10:13:25 +0000
commit27cda0d77b650ff8ea9da72cf610f1ea2c95a04d (patch)
treee56523240f1bf26a6c430058597efdb8fa44accb
parent0b4993412b2ba0e04209b4e2f0aec4c3a55c6c9d (diff)
downloadppe42-gcc-27cda0d77b650ff8ea9da72cf610f1ea2c95a04d.tar.gz
ppe42-gcc-27cda0d77b650ff8ea9da72cf610f1ea2c95a04d.zip
2008-05-27 Thomas Quinot <quinot@adacore.com>
* makeutl.adb: Minor code reorganization git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135996 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/makeutl.adb8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb
index 71e207a55f8..ad63cc3e95e 100644
--- a/gcc/ada/makeutl.adb
+++ b/gcc/ada/makeutl.adb
@@ -526,11 +526,11 @@ package body Makeutl is
function Get_Location return Source_Ptr is
begin
- if Current < Names.First or else Current > Names.Last then
- return No_Location;
+ if Current in Names.First .. Names.Last then
+ return Names.Table (Current).Location;
else
- return Names.Table (Current).Location;
+ return No_Location;
end if;
end Get_Location;
@@ -584,7 +584,7 @@ package body Makeutl is
procedure Update_Main (Name : String) is
begin
- if Current >= Names.First and then Current <= Names.Last then
+ if Current in Names.First .. Names.Last then
Name_Len := 0;
Add_Str_To_Name_Buffer (Name);
Names.Table (Current).File_Name := Name_Find;
OpenPOWER on IntegriCloud