From ce72cdff6ecc6c47e0e25bc0c41fc19809b01d9f Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 21 May 2021 17:51:39 +0200 Subject: VTY: write_one_asp(): fix 1 << 31 cannot be represented by 'int' Change-Id: Ib144df42baed16aeffa5b56afd0c17960ee6004e Closes: OS#5158 --- src/osmo_ss7_vty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index dcbe9b2..63625a8 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -857,8 +857,8 @@ static void write_one_asp(struct vty *vty, struct osmo_ss7_asp *asp, bool show_d } if (!asp->cfg.is_server) vty_out(vty, " sctp-role client%s", VTY_NEWLINE); - for (i = 0; i < 32; i++) { - if (!(asp->cfg.quirks & (1 << i))) + for (i = 0; i < sizeof(uint32_t) * 8; i++) { + if (!(asp->cfg.quirks & ((uint32_t) 1 << i))) continue; vty_out(vty, " quirk %s%s", get_value_string(asp_quirk_names, (1 << i)), VTY_NEWLINE); } -- cgit v1.2.3