<p style="white-space: pre-wrap; word-wrap: break-word;">Without looking at next patches, I have the feeling most of these APIs are so simple they are really not needed. Having the struct would be enough. Also I don't like this way of splitting between commits where a bunch of APIs not being used anywhere are added in one commit.</p><p>Patch set 5:<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/12761">View Change</a></p><p>6 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12761/5/contrib/jenkins.sh">File contrib/jenkins.sh:</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/12761/5/contrib/jenkins.sh@27">Patch Set #5, Line 27:</a> <code style="font-family:monospace,monospace">export PATH="$inst/bin:$PATH"</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">why is this line needed?</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12761/5/src/client.c">File src/client.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/12761/5/src/client.c@34">Patch Set #5, Line 34:</a> <code style="font-family:monospace,monospace">#define MATCH(a, b) (strcmp(a, b) != 0) ? false : true</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">can be simplified: #define MATCH(a, b) (strcmp(a,b) == 0)</p><p style="white-space: pre-wrap; word-wrap: break-word;">which makes me think if we really need this MATCH statement...</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12761/5/src/client.c@38">Patch Set #5, Line 38:</a> <code style="font-family:monospace,monospace">    bool m_name = MATCH(match, cfg->name), m_host = MATCH(match, cfg->remote_host);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">separate lines please.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12761/5/src/client.c@56">Patch Set #5, Line 56:</a> <code style="font-family:monospace,monospace">struct host_cfg *make_config(void *ctx, const char *name, const char *host, uint16_t port)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This is basically a constructor/allocator, so better name it like we usually do, like talloc_host_cfg or host_cfg_alloc.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12761/5/src/client.c@79">Patch Set #5, Line 79:</a> <code style="font-family:monospace,monospace">char *get_authority(void *ctx, const struct host_cfg *cfg)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">It's allocating something and the method is not const, so I'd better name it "create_authority" or "make_authority".</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12761/5/src/client.c@81">Patch Set #5, Line 81:</a> <code style="font-family:monospace,monospace"> if (!cfg->remote_host)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Is this really needed?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12761">change 12761</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/12761"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sysmon </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ie321655a92cdbefbfaa056ac0d583397c83beccb </div>
<div style="display:none"> Gerrit-Change-Number: 12761 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 01 Feb 2019 16:06:44 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>