]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/jv-lang.c
Switch the license of all .c files to GPLv3.
[thirdparty/binutils-gdb.git] / gdb / jv-lang.c
index fb2b419d19188c8f479d803b7e5c41b6b66fbd6c..3460184a3682442d27b422bc44b3780c57c003f2 100644 (file)
@@ -7,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -16,9 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "symtab.h"
@@ -39,6 +37,7 @@
 #include "demangle.h"
 #include "dictionary.h"
 #include <ctype.h>
+#include "gdb_assert.h"
 
 struct type *java_int_type;
 struct type *java_byte_type;
@@ -351,13 +350,14 @@ java_link_class_type (struct type *type, struct value *clas)
   struct objfile *objfile = get_dynamics_objfile ();
   struct type *tsuper;
 
+  gdb_assert (name != NULL);
   unqualified_name = strrchr (name, '.');
   if (unqualified_name == NULL)
     unqualified_name = name;
 
   temp = clas;
   temp = value_struct_elt (&temp, NULL, "superclass", NULL, "structure");
-  if (name != NULL && strcmp (name, "java.lang.Object") == 0)
+  if (strcmp (name, "java.lang.Object") == 0)
     {
       tsuper = get_java_object_type ();
       if (tsuper && TYPE_CODE (tsuper) == TYPE_CODE_PTR)