<p><a href="https://gerrit.osmocom.org/c/osmo-msc/+/15947">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h">File include/osmocom/msc/debug.h:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h@38">Patch Set #1, Line 38:</a> <code style="font-family:monospace,monospace">    size_t len = 64; \</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Makes much more sense having len as a param to avoid almost-sure talloc_realloc on some functions.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">you're right</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h@40">Patch Set #1, Line 40:</a> <code style="font-family:monospace,monospace">    char *str = (char*)talloc_named_const(ctx, len, #FUNC_BUF "_c()"); \</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">where does this "ctx" var come from?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">it's a required parameter indicated above as foo_name_c(void *ctx,</p><p style="white-space: pre-wrap; word-wrap: break-word;">But hold on, I actually moved this to libosmocore in a more generalized fashion, and forgot to apply that here.<br>Ah I remember now, I also needed this in osmo-hlr for the Distributed GSM task.<br>I'll submit that libosmocore patch first and use that here as well.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I've taken your points into consideration and submitted https://gerrit.osmocom.org/c/libosmocore/+/15957</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-msc/+/15947/1/include/osmocom/msc/debug.h@63">Patch Set #1, Line 63:</a> <code style="font-family:monospace,monospace">#define NAME_IMPL(FUNC_C, FUNC_C_ARGS...) \</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">So you return a talloc'ed pointer on success and a static string pointer on error? That will break w […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">the point being that I want to use this function in printf() formats, and there returning NULL is a crash.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-msc/+/15947">change 15947</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-msc/+/15947"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If3ce23cd5bab15e2ab4c52ef3e4c75979dffe931 </div>
<div style="display:none"> Gerrit-Change-Number: 15947 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 04 Nov 2019 23:59:56 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>