diff options
-rw-r--r-- | src/dyn_tables.adb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/dyn_tables.adb b/src/dyn_tables.adb index 9af097702..c7fcc41e8 100644 --- a/src/dyn_tables.adb +++ b/src/dyn_tables.adb @@ -49,21 +49,21 @@ package body Dyn_Tables is -- Check if need to reallocate. if T.Priv.Last_Pos < T.Priv.Length then return; - else - -- Double the length. - loop - New_Len := T.Priv.Length * 2; - - -- Check overflow. - if New_Len < T.Priv.Length then - raise Constraint_Error; - end if; - - T.Priv.Length := New_Len; - exit when New_Len > T.Priv.Last_Pos; - end loop; end if; + -- Double the length. + loop + New_Len := T.Priv.Length * 2; + + -- Check overflow. + if New_Len < T.Priv.Length then + raise Constraint_Error; + end if; + + T.Priv.Length := New_Len; + exit when New_Len > T.Priv.Last_Pos; + end loop; + -- Realloc and check result. if size_t (T.Priv.Length) > size_t'Last / El_Size then raise Constraint_Error; |