Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnatls.adb (Gnatls): Use Name_Find function.
* targparm.adb (Get_Target_Parameters): Likewise.
diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb
--- a/gcc/ada/gnatls.adb
+++ b/gcc/ada/gnatls.adb
@@ -2092,10 +2092,7 @@ begin
Hi : Source_Ptr;
begin
- Name_Buffer (1 .. 10) := "system.ads";
- Name_Len := 10;
-
- Read_Source_File (Name_Find, 0, Hi, Text, FD);
+ Read_Source_File (Name_Find ("system.ads"), 0, Hi, Text, FD);
if Null_Source_Buffer_Ptr (Text) then
No_Runtime := True;
diff --git a/gcc/ada/targparm.adb b/gcc/ada/targparm.adb
--- a/gcc/ada/targparm.adb
+++ b/gcc/ada/targparm.adb
@@ -157,10 +157,7 @@ package body Targparm is
return;
end if;
- Name_Buffer (1 .. 10) := "system.ads";
- Name_Len := 10;
-
- Read_Source_File (Name_Find, 0, Hi, Text, FD);
+ Read_Source_File (Name_Find ("system.ads"), 0, Hi, Text, FD);
if Null_Source_Buffer_Ptr (Text) then
Write_Line ("fatal error, run-time library not installed correctly");