<p><a href="https://gerrit.osmocom.org/12093">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12093/1/src/logging.c">File src/logging.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/12093/1/src/logging.c@926">Patch Set #1, Line 926:</a> <code style="font-family:monospace,monospace">            if (target->tgt_file.out != stdout)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Could you elaborate? How else should it look like? And why you think it's wrong?</blockquote></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">This looks messy:<br>if (target->tgt_file.out != stderr)<br>if (target->tgt_file.out != stdout)<br>{<br>   fclose(target->tgt_file.out);<br>      target->tgt_file.out = NULL;<br>}</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">I'd welcome perhaps something like:<br>#if stderr<br>if (target->tgt_file.out == stderr) {/* don't close */} else<br>#endif<br>#if stdout<br>if (target->tgt_file.out == stdout) {/* don't close */} else<br>#endif<br>{<br>      fclose(target->tgt_file.out);<br>      target->tgt_file.out = NULL;<br>}</pre></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12093">change 12093</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/12093"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ia786361f5f687e43b27d87a45b4630bca58bcfe8 </div>
<div style="display:none"> Gerrit-Change-Number: 12093 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </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: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 04 Dec 2018 12:18:02 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>