2007-06-28 Michael Snyder <msnyder@access-company.com>
authorMichael Snyder <msnyder@vmware.com>
Fri, 29 Jun 2007 00:35:08 +0000 (00:35 +0000)
committerMichael Snyder <msnyder@vmware.com>
Fri, 29 Jun 2007 00:35:08 +0000 (00:35 +0000)
* m2-typeprint.c (m2_print_type): Move pointer ref after null test
(Coverity).

gdb/ChangeLog
gdb/m2-typeprint.c

index 43ee13e..12c7f78 100644 (file)
@@ -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).
 
index 5ae08b7..80e7719 100644 (file)
@@ -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: