* sparc-tdep.c (sparc_integral_or_pointer_p): Simplify.
authorMark Kettenis <kettenis@gnu.org>
Sun, 16 Jan 2005 20:06:54 +0000 (20:06 +0000)
committerMark Kettenis <kettenis@gnu.org>
Sun, 16 Jan 2005 20:06:54 +0000 (20:06 +0000)
gdb/ChangeLog
gdb/sparc-tdep.c

index 57feab0825e05fe9552fcc5a44cc2f3f26ace06a..9caec1f6b5c2936e6eb8447f5c79c836b67faf03 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-16  Mark Kettenis  <kettenis@gnu.org>
+
+       * sparc-tdep.c (sparc_integral_or_pointer_p): Simplify.
+
 2005-01-16  Andrew Cagney  <cagney@gnu.org>
 
        * exceptions.c (struct catcher): Delete saved_error_pre_print and
index b4051c9ba656b91fa858e3c7e8c2dddb74133c2f..e17e0a716e426e02fb13b065b482cff62a0d56ca 100644 (file)
@@ -188,6 +188,8 @@ sparc_address_from_register (int regnum)
 static int
 sparc_integral_or_pointer_p (const struct type *type)
 {
+  int len = TYPE_LENGTH (type);
+
   switch (TYPE_CODE (type))
     {
     case TYPE_CODE_INT:
@@ -195,22 +197,14 @@ sparc_integral_or_pointer_p (const struct type *type)
     case TYPE_CODE_CHAR:
     case TYPE_CODE_ENUM:
     case TYPE_CODE_RANGE:
-      {
-       /* We have byte, half-word, word and extended-word/doubleword
-           integral types.  The doubleword is an extension to the
-           original 32-bit ABI by the SCD 2.4.x.  */
-       int len = TYPE_LENGTH (type);
-       return (len == 1 || len == 2 || len == 4 || len == 8);
-      }
-      return 1;
+      /* We have byte, half-word, word and extended-word/doubleword
+        integral types.  The doubleword is an extension to the
+        original 32-bit ABI by the SCD 2.4.x.  */
+      return (len == 1 || len == 2 || len == 4 || len == 8);
     case TYPE_CODE_PTR:
     case TYPE_CODE_REF:
-      {
-       /* Allow either 32-bit or 64-bit pointers.  */
-       int len = TYPE_LENGTH (type);
-       return (len == 4 || len == 8);
-      }
-      return 1;
+      /* Allow either 32-bit or 64-bit pointers.  */
+      return (len == 4 || len == 8);
     default:
       break;
     }
This page took 0.028341 seconds and 4 git commands to generate.