summaryrefslogtreecommitdiff
path: root/gdb/v850-tdep.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-06-11 13:10:48 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2016-06-14 11:50:58 -0700
commit4bf5402d913e9a5d17d9ffb8701dbd054e1d158c (patch)
treed1a2a1b9c910c64d81e33dcbcd4926ae9ca89d2e /gdb/v850-tdep.c
parent683cd65eb4787e3e2921076699e0ca9b00762df3 (diff)
Remove unneeded checks on type lengths.
Type lengths are unsigned, so they are always greater than or equal to zero. A check against the length of 'tgt_type' is retained to prevent dividing by zero. gdb/ChangeLog: * v850-tdep.c (v850_use_struct_convention): Trim type length checks.
Diffstat (limited to 'gdb/v850-tdep.c')
-rw-r--r--gdb/v850-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 612eec33fa..0b50580f7c 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -559,7 +559,7 @@ v850_use_struct_convention (struct gdbarch *gdbarch, struct type *type)
if (TYPE_CODE (fld_type) == TYPE_CODE_ARRAY)
{
tgt_type = TYPE_TARGET_TYPE (fld_type);
- if (TYPE_LENGTH (fld_type) >= 0 && TYPE_LENGTH (tgt_type) >= 0
+ if (TYPE_LENGTH (tgt_type) > 0
&& TYPE_LENGTH (fld_type) / TYPE_LENGTH (tgt_type) > 2)
return 1;
}