harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

commit 84835b6530c0f196507aae0c77a4cf98cbce749e
parent f72a9f03cf843b58780c08f0788ed83aa616691d
Author: Bor Grošelj Simić <bgs@turminal.net>
Date:   Sun, 30 Oct 2022 21:22:41 +0100

tagged_select_subtype: remove redundant checks in a condition

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>

Diffstat:
Msrc/types.c | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/types.c b/src/types.c @@ -458,11 +458,7 @@ tagged_select_subtype(const struct type *tagged, const struct type *subtype) struct type _tustripped; const struct type *tustripped = strip_flags(tu->type, &_tustripped); - // XXX: Kind of stupid - if (tu->type->id == subtype->id - || tu->type->id == stripped->id - || tustripped->id == subtype->id - || tustripped->id == stripped->id) { + if (tustripped->id == stripped->id) { return tu->type; }