[Asterisk-code-review] chan ooh323: Avoid typecasting an int to unsigned short. (asterisk[13])

Jenkins2 asteriskteam at digium.com
Fri Jan 12 11:32:09 CST 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7946 )

Change subject: chan_ooh323: Avoid typecasting an int to unsigned short.
......................................................................

chan_ooh323: Avoid typecasting an int to unsigned short.

clang 5.0 warned about this.

ASTERISK-27577

Change-Id: I898fe4255023138a9e8b579fe4482fcf582f2b78
---
M addons/chan_ooh323.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve
  Matthew Fredrickson: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c
index 3afcecd..5d5f5fe 100644
--- a/addons/chan_ooh323.c
+++ b/addons/chan_ooh323.c
@@ -3215,7 +3215,7 @@
 	}
 
 	if (peer) {
-		sprintf(ip_port, "%s:%hu", peer->ip, peer->port);
+		sprintf(ip_port, "%s:%d", peer->ip, peer->port);
 		ast_cli(a->fd, "%-15.15s%s\n", "Name: ", peer->name);
 		ast_cli(a->fd, "%s:%s,%s\n", "FastStart/H.245 Tunneling", peer->faststart?"yes":"no",
 					peer->h245tunneling?"yes":"no");
@@ -3306,7 +3306,7 @@
 	peer = peerl.peers;
 	while (peer) {
 		ast_mutex_lock(&peer->lock);
-		snprintf(ip_port, sizeof(ip_port), "%s:%hu", peer->ip, peer->port);
+		snprintf(ip_port, sizeof(ip_port), "%s:%d", peer->ip, peer->port);
 		ast_cli(a->fd, FORMAT, peer->name,
 					peer->accountcode,
 					ip_port,

-- 
To view, visit https://gerrit.asterisk.org/7946
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I898fe4255023138a9e8b579fe4482fcf582f2b78
Gerrit-Change-Number: 7946
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180112/c34efe0c/attachment-0001.html>


More information about the asterisk-code-review mailing list