OSDN Git Service

simplify ada-valprint.c:ada_val_print_array
authorbrobecke <brobecke>
Mon, 7 Mar 2011 17:57:08 +0000 (17:57 +0000)
committerbrobecke <brobecke>
Mon, 7 Mar 2011 17:57:08 +0000 (17:57 +0000)
commit87f4bc83d8e6807cae29c25f9668057fc1dff26b
treeb6903be021a55ce84af5db95c077c5dc462053f3
parentef2e91ff9f7073d620cb3136fb9b899c88ba39da
simplify ada-valprint.c:ada_val_print_array

Two things:
  - Move the declaration of a couple of variables inside the block
    where they are actually used;
  - Remove some code that checks against NULL/zero, because the
    condition should always be false. Add some gdb_asserts to
    make sure we never fail those assumptions.

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_array): Move the declaration of
        "byte_order" and "elttype" inside the block where these variables
        are actually used.  Remove some special handling for the case
        where "elttype" and "eltlen" are null.  Replace by a comment
        and a couple of assertion checks.
gdb/ChangeLog
gdb/ada-valprint.c