[PATCH] Fix mistaken comparison that becomes a no-op.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix a mistake in same_cast_type where the second test became a no-op as it
compared a value to itself, rather than to the second operand.

Signed-off-by: James Westby <jw+debian@xxxxxxxxxxxxxxx>
---
 evaluate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/evaluate.c b/evaluate.c
index ca49ed0..e3aa2fe 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -179,7 +179,7 @@ left:
 
 static int same_cast_type(struct symbol *orig, struct symbol *new)
 {
-	return orig->bit_size == new->bit_size && orig->bit_offset == orig->bit_offset;
+	return orig->bit_size == new->bit_size && orig->bit_offset == new->bit_offset;
 }
 
 static struct symbol *base_type(struct symbol *node, unsigned long *modp, unsigned long *asp)
-- 
1.4.4.2


-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux