Change in ...osmo-sip-connector[master]: inet_ntoa() is deprecated, use inet_ntop() instead

pespin gerrit-no-reply at lists.osmocom.org
Tue Aug 6 14:18:06 UTC 2019


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/15065 )

Change subject: inet_ntoa() is deprecated, use inet_ntop() instead
......................................................................


Patch Set 3: Code-Review+1

(5 comments)

https://gerrit.osmocom.org/#/c/15065/3/src/mncc.c 
File src/mncc.c:

https://gerrit.osmocom.org/#/c/15065/3/src/mncc.c@192 
PS3, Line 192: 	char ip_addr[INET_ADDRSTRLEN];
Please move this line to start of the function together with other variables, there's no specific need/reason to have it placed here.


https://gerrit.osmocom.org/#/c/15065/3/src/mncc.c@193 
PS3, Line 193: 	inet_ntop(AF_INET, &net, ip_addr, INET_ADDRSTRLEN);
As a tip, usually you want to use sizeof(ip_addr) here instead of INET_ADDRSTRLEN (this way if size of ip_addr changes later this lines doesn't need to be changed).


https://gerrit.osmocom.org/#/c/15065/3/src/mncc.c@422 
PS3, Line 422: 	char ip_addr[INET_ADDRSTRLEN];
Same comment.


https://gerrit.osmocom.org/#/c/15065/3/src/sdp.c 
File src/sdp.c:

https://gerrit.osmocom.org/#/c/15065/3/src/sdp.c@211 
PS3, Line 211: 	inet_ntop(AF_INET, &net, ip_addr, INET_ADDRSTRLEN);
cosmetic: Usually leave an empty line between variable definition block and logic block.


https://gerrit.osmocom.org/#/c/15065/3/src/sip.c 
File src/sip.c:

https://gerrit.osmocom.org/#/c/15065/3/src/sip.c@162 
PS3, Line 162: 	char ip_addr[INET_ADDRSTRLEN];
Same comments.



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/15065
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: If6a96ede7d5e73884c32fbfdb03052e2bda50a77
Gerrit-Change-Number: 15065
Gerrit-PatchSet: 3
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 06 Aug 2019 14:18:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190806/870bbd33/attachment.html>


More information about the gerrit-log mailing list