aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-09-25 20:49:22 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-09-30 03:38:50 +0200
commit959e165a34d52778ca96bb062dc9c30063e8ccdf (patch)
treeec2e0440b7d0fcca137ea9e33bcf36730cf6b141 /validation
parent6d37de7ad9804f1a606839346101f2425ed86a13 (diff)
downloadsparse-dev-959e165a34d52778ca96bb062dc9c30063e8ccdf.tar.gz
remove useless optimization in cast_enum_list()
The function cast_enum_list() is used to give the same type to all elements of an enum declaration. The base case for doing this is to call cast_value() on the element, but this call is not done is the size of the element already match the size of the common type. This special case is an optimization but not an interesting one since cast_value() is not a costly function. OTOH, it somehow complicates the flow inside cast_enum_list(). So, remove the optimisation by letting cast_value() to handle all cases. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
0 files changed, 0 insertions, 0 deletions