Change in osmo-mgw[master]: embed strings into structs

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/.

dexter gerrit-no-reply at lists.osmocom.org
Mon Sep 13 09:03:19 UTC 2021


dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/25426 )

Change subject: embed strings into structs
......................................................................


Patch Set 10: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/osmo-mgw/+/25426/10/src/libosmo-mgcp/mgcp_vty.c 
File src/libosmo-mgcp/mgcp_vty.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/25426/10/src/libosmo-mgcp/mgcp_vty.c@551 
PS10, Line 551: 	osmo_strlcpy(g_cfg->net_ports.bind_addr_v4, "", sizeof(g_cfg->net_ports.bind_addr_v4));
the osmo_strlcpy with the zero length string looks wired. I would do it differently:

g_cfg->net_ports.bind_addr_v4[0] = '\0'
or
memset(g_cfg->net_ports.bind_addr_v4, 0, sizeof(g_cfg->net_ports.bind_addr_v4));

Thsts of course my personal taste. Don't change it when you like the osmo_strlcpy.



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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I7b46d531c5d3b53984f2ce44538116973f6a074d
Gerrit-Change-Number: 25426
Gerrit-PatchSet: 10
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Mon, 13 Sep 2021 09:03:19 +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/20210913/84cdaf19/attachment.htm>


More information about the gerrit-log mailing list