Change in libosmocore[master]: ctrl: Pre-calculate required size before allocating msgb

neels gerrit-no-reply at lists.osmocom.org
Thu Jun 10 15:13:41 UTC 2021


neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24639 )

Change subject: ctrl: Pre-calculate required size before allocating msgb
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/c/libosmocore/+/24639/1/tests/ctrl/ctrl_test.c 
File tests/ctrl/ctrl_test.c:

https://gerrit.osmocom.org/c/libosmocore/+/24639/1/tests/ctrl/ctrl_test.c@120 
PS1, Line 120: 
this part seems unrelated to the commit log message.

Instead of copying msgb test data to a string to append a trailing \0,
just pass the length to osmo_escape_str(msgb_l2(), msgb_l2len()).

also: ctrl_test.c applies fixed input to CTRL, is this fixing anything?


https://gerrit.osmocom.org/c/libosmocore/+/24639/1/tests/ctrl/ctrl_test.c@121 
PS1, Line 121: 		char *strbuf = talloc_size(sent_msg, msgb_l2len(sent_msg) + 1);
(osmo style would want to declare char *strbuf above the OSMO_ASSERT)



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0b8f370f7b08736207f9efed13a0663b5e482824
Gerrit-Change-Number: 24639
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Jun 2021 15:13:41 +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/20210610/5eef6522/attachment.htm>


More information about the gerrit-log mailing list