aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-strsea.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2009-07-07 13:22:34 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2009-07-07 15:22:34 +0200
commit75a5a4879d5046afb73aba4a403472e9f349cbed (patch)
tree0d62b778459616a301d7b5a24088c9a2ab8f5158 /gcc/ada/a-strsea.adb
parent85686ad98b329307ecdcdef3e75babbb8eed799d (diff)
downloadgcc-75a5a4879d5046afb73aba4a403472e9f349cbed.zip
gcc-75a5a4879d5046afb73aba4a403472e9f349cbed.tar.gz
gcc-75a5a4879d5046afb73aba4a403472e9f349cbed.tar.bz2
s-osprim-mingw.adb: Minor reformatting Minor code reorganization
2009-07-07 Robert Dewar <dewar@adacore.com> * s-osprim-mingw.adb: Minor reformatting Minor code reorganization * a-stzsea.adb, a-stwise.adb, a-strsea.adb (Index): Redo previous change (Ind should be Integer). From-SVN: r149327
Diffstat (limited to 'gcc/ada/a-strsea.adb')
-rw-r--r--gcc/ada/a-strsea.adb8
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/ada/a-strsea.adb b/gcc/ada/a-strsea.adb
index dbeb0e4..d689833 100644
--- a/gcc/ada/a-strsea.adb
+++ b/gcc/ada/a-strsea.adb
@@ -238,7 +238,7 @@ package body Ada.Strings.Search is
Mapping : Maps.Character_Mapping := Maps.Identity) return Natural
is
PL1 : constant Integer := Pattern'Length - 1;
- Ind : Natural;
+ Ind : Integer; -- can be negative if Pattern'Length > Source'Length
Cur : Natural;
begin
@@ -246,12 +246,6 @@ package body Ada.Strings.Search is
raise Pattern_Error;
end if;
- -- If Pattern longer than Source it can't be found
-
- if Pattern'Length > Source'Length then
- return 0;
- end if;
-
-- Forwards case
if Going = Forward then