OSDN Git Service

simplify ada-valprint.c:ada_val_print_array
authorbrobecke <brobecke>
Mon, 7 Mar 2011 08:57:08 +0000 (08:57 +0000)
committerbrobecke <brobecke>
Mon, 7 Mar 2011 08:57:08 +0000 (08:57 +0000)
commitb4a48f347ee0130e6a4bbd5e1d48a2249146139b
tree918e6cb00a61e202cac6b524cdf9f31a4e9a10fe
parent3ff1aa65ea13f76ffff885bcf0e0a3db089caa1d
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