* [PATCH] Remove unneeded variable in integer_promotion()
@ 2016-11-02 22:11 Luc Van Oostenryck
2016-11-17 16:56 ` Christopher Li
0 siblings, 1 reply; 2+ messages in thread
From: Luc Van Oostenryck @ 2016-11-02 22:11 UTC (permalink / raw)
To: linux-sparse; +Cc: Christopher Li, Luc Van Oostenryck
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove unneeded variable in integer_promotion()
2016-11-02 22:11 [PATCH] Remove unneeded variable in integer_promotion() Luc Van Oostenryck
@ 2016-11-17 16:56 ` Christopher Li
0 siblings, 0 replies; 2+ messages in thread
From: Christopher Li @ 2016-11-17 16:56 UTC (permalink / raw)
To: Luc Van Oostenryck; +Cc: Linux-Sparse
On Thu, Nov 3, 2016 at 6:11 AM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> 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'.
Indeed. Applied.
Chris
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-17 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02 22:11 [PATCH] Remove unneeded variable in integer_promotion() Luc Van Oostenryck
2016-11-17 16:56 ` Christopher Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).