public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1491] [Ada] Remove use of a global name buffer when locating a file
@ 2022-07-05 8:30 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-07-05 8:30 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:aba3ce53e5dc855172164f51080cd71f05f1d994
commit r13-1491-gaba3ce53e5dc855172164f51080cd71f05f1d994
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Sat Mar 26 00:13:28 2022 +0100
[Ada] Remove use of a global name buffer when locating a file
Code cleanup; semantics is unaffected.
gcc/ada/
* osint.adb (Locate_File): Use Name_Find with a parameter and
not with a global buffer.
Diff:
---
gcc/ada/osint.adb | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb
index eeedfcbc3ae..86fbf2d0922 100644
--- a/gcc/ada/osint.adb
+++ b/gcc/ada/osint.adb
@@ -1904,10 +1904,8 @@ package body Osint is
if Dir_Name'Length = 0 then
Found := N;
else
- Name_Len := Full_Name'Length - 1;
- Name_Buffer (1 .. Name_Len) :=
- Full_Name (1 .. Full_Name'Last - 1);
- Found := Name_Find;
+ Found :=
+ Name_Find (Full_Name (Full_Name'First .. Full_Name'Last - 1));
end if;
end if;
end;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-05 8:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 8:30 [gcc r13-1491] [Ada] Remove use of a global name buffer when locating a file Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).