diff options
author | Michael Snyder <msnyder@vmware.com> | 2007-06-29 00:35:08 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2007-06-29 00:35:08 +0000 |
commit | f08312c2d4e86b40fed18f1a9c4e38192e272cea (patch) | |
tree | d183b622b4a50e986eeebb33b064750bafeb050a | |
parent | 1ac7d223d31a3a2e175d25a944f838de22da73d7 (diff) | |
download | gdb-f08312c2d4e86b40fed18f1a9c4e38192e272cea.zip gdb-f08312c2d4e86b40fed18f1a9c4e38192e272cea.tar.gz gdb-f08312c2d4e86b40fed18f1a9c4e38192e272cea.tar.bz2 |
2007-06-28 Michael Snyder <msnyder@access-company.com>
* m2-typeprint.c (m2_print_type): Move pointer ref after null test
(Coverity).
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/m2-typeprint.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 43ee13e..12c7f78 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2007-06-28 Michael Snyder <msnyder@access-company.com> + * m2-typeprint.c (m2_print_type): Move pointer ref after null test + (Coverity). + * linux-thread-db.c (thread_db_get_thread_local_address): Add gdb_assert before using return value of find_thread_pid (Coverity). diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c index 5ae08b7..80e7719 100644 --- a/gdb/m2-typeprint.c +++ b/gdb/m2-typeprint.c @@ -72,7 +72,6 @@ m2_print_type (struct type *type, char *varstring, struct ui_file *stream, int demangled_args; CHECK_TYPEDEF (type); - code = TYPE_CODE (type); QUIT; @@ -83,6 +82,7 @@ m2_print_type (struct type *type, char *varstring, struct ui_file *stream, return; } + code = TYPE_CODE (type); switch (TYPE_CODE (type)) { case TYPE_CODE_SET: |