Change in libosmo-sccp[master]: VTY: write_one_asp(): fix 1 << 31 cannot be represented by 'int'

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat May 22 20:39:04 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/24330 )

Change subject: VTY: write_one_asp(): fix 1 << 31 cannot be represented by 'int'
......................................................................

VTY: write_one_asp(): fix 1 << 31 cannot be represented by 'int'

Change-Id: Ib144df42baed16aeffa5b56afd0c17960ee6004e
Closes: OS#5158
---
M src/osmo_ss7_vty.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



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 @@
 	}
 	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);
 	}

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/24330
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ib144df42baed16aeffa5b56afd0c17960ee6004e
Gerrit-Change-Number: 24330
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210522/332ccf14/attachment.htm>


More information about the gerrit-log mailing list