[PATCH] Remove unneeded variable in integer_promotion()

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

 



Following some previous simplification done on the function,
the variable 'orig_type' is now always the same as 'type'.

To avoid possible confusion, only use 'type' and remove
the declaration of 'orig_type'.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 evaluate.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/evaluate.c b/evaluate.c
index e350c0c0..14a02038 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -117,7 +117,6 @@ static struct symbol *evaluate_string(struct expression *expr)
 /* type has come from classify_type and is an integer type */
 static inline struct symbol *integer_promotion(struct symbol *type)
 {
-	struct symbol *orig_type = type;
 	unsigned long mod =  type->ctype.modifiers;
 	int width = type->bit_size;
 
@@ -128,7 +127,6 @@ static inline struct symbol *integer_promotion(struct symbol *type)
 	 */
 	if (type->type == SYM_BITFIELD) {
 		type = type->ctype.base_type;
-		orig_type = type;
 	}
 	mod = type->ctype.modifiers;
 	if (width < bits_in_int)
@@ -140,7 +138,7 @@ static inline struct symbol *integer_promotion(struct symbol *type)
 			return &uint_ctype;
 		return &int_ctype;
 	}
-	return orig_type;
+	return type;
 }
 
 /*
-- 
2.10.1

--
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