From f08312c2d4e86b40fed18f1a9c4e38192e272cea Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 29 Jun 2007 00:35:08 +0000 Subject: 2007-06-28 Michael Snyder * m2-typeprint.c (m2_print_type): Move pointer ref after null test (Coverity). --- gdb/ChangeLog | 3 +++ gdb/m2-typeprint.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 + * 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: -- cgit v1.1