libosmocore[master]: add function msgb_printf() to print formatted text into msg buf

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Oct 13 13:52:13 UTC 2017


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/4200/3/tests/msgb/msgb_test.c
File tests/msgb/msgb_test.c:

Line 291: 	       msg->data);
> Not sure I get what you want, but there's msgb_hexdump() which might be use
what I want is to output the buffer contents as indicated by msgb_length(), instead of trying to guess its length with strlen() on the data and relying on a nul byte that is actually outside of the msgb data. msgb_hexdump() works, but it outputs the hexdump instead of the plain string, so it makes it hard for humans to verify that the resulting string is as expected.


-- 
To view, visit https://gerrit.osmocom.org/4200
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I15e1af68616309555d0ed9ac5da027c9833d42e3
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes


More information about the gerrit-log mailing list