<p style="white-space: pre-wrap; word-wrap: break-word;">Marking -1 for explained reasons (+ yourself not really finding a good scenario for it). However, I'd welcome if you could send a patch using osmo_talloc_replace_string() for the existing code. Grep for that function in osmocom code, you'll see lots of examples.</p><p>Patch set 6:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941">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-ggsn/+/17941/6/ggsn/ggsn_vty.c">File ggsn/ggsn_vty.c:</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-ggsn/+/17941/6/ggsn/ggsn_vty.c@a286">Patch Set #6, Line 286:</a> <code style="font-family:monospace,monospace">       ggsn->cfg.default_apn = apn;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">BTW, I am wondering... this looks bad to me. We should be doing osmo_talloc_replace_string() here, so he strdup it.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/6/ggsn/ggsn_vty.c@a295">Patch Set #6, Line 295:</a> <code style="font-family:monospace,monospace">      ggsn->cfg.default_apn = NULL;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same here, osmo_talloc_replace_string.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/6/ggsn/ggsn_vty.c@284">Patch Set #6, Line 284:</a> <code style="font-family:monospace,monospace">           argv[1] = argv[0];</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">It took me some time to realize that it's for backwards compatibility with 'default-apn NAME'. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Agree with fixeria. It's maybe fine doing like keith did but you are probably assuming too much about implementation there, and may become problematic if implementation changes at a later pointer. Doing like fixeria says avoids this kind of issue.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941">change 17941</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-ggsn/+/17941"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ggsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I03fcf8a1532bd9988ea99a6afd3dc325174ce9d6 </div>
<div style="display:none"> Gerrit-Change-Number: 17941 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 27 Apr 2020 10:11:51 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Comment-In-Reply-To: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Comment-In-Reply-To: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>