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

Hoernchen gerrit-no-reply at lists.osmocom.org
Fri Sep 10 13:48:16 UTC 2021


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

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


Patch Set 9:

(1 comment)

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

https://gerrit.osmocom.org/c/osmo-mgw/+/25426/9/src/libosmo-mgcp/mgcp_protocol.c@276 
PS9, Line 276: 	const char *addr = strlen(endp->cfg->local_ip) ? endp->cfg->local_ip : conn->end.local_addr;
> endp->cfg->local_ip[0] != '\0' […]
No, we have better things to do that trying to optimize string length counting and instead having 23451234512345 useless pointes everywhere that clutter the talloc tree and are smaller than any related talloc header.

Having embedded strings means we can just copy a struct, having useless pointers everywhere means we can never just copy a struct and have to deal with tons of useless pointers everyhwere.



-- 
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: 9
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Fri, 10 Sep 2021 13:48:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210910/2f3b783e/attachment.htm>


More information about the gerrit-log mailing list