aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 38c7b0e..7a669f1 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -346,13 +346,12 @@ float_type_from_length (struct type *type)
{
struct gdbarch *gdbarch = get_type_arch (type);
const struct builtin_type *builtin = builtin_type (gdbarch);
- unsigned int len = TYPE_LENGTH (type);
- if (len == TYPE_LENGTH (builtin->builtin_float))
+ if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_float))
type = builtin->builtin_float;
- else if (len == TYPE_LENGTH (builtin->builtin_double))
+ else if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_double))
type = builtin->builtin_double;
- else if (len == TYPE_LENGTH (builtin->builtin_long_double))
+ else if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_long_double))
type = builtin->builtin_long_double;
return type;