<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>


<style>img {
max-width: 100%; height: auto;
}
body {
font-size: 0.875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";'>
<div class="content">

<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 auto;">
<tbody>
<tr>
<td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; overflow: hidden;" align="left" bgcolor="#ffffff">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; border-collapse: separate; border-spacing: 0;">
<tbody>
<tr>
<td style="color: #333333; border-bottom-width: 1px; border-bottom-color: #ededed; border-bottom-style: solid; font-weight: bold; line-height: 1.4; padding: 20px 0;">
Merge request <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1639" style="color: #1068bf;">!1639</a> was reviewed by <a href="https://gitlab.com/dueno" style="color: #1068bf;">Daiki Ueno</a>
</td>
</tr>
<tr>
<td style="overflow: hidden; line-height: 1.4; display: grid;">
<p style="color: #777777;">
<a href="https://gitlab.com/dueno" style="color: #1068bf;">Daiki Ueno</a>
started a new
discussion on <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1639#note_1095547149" style="color: #1068bf;">lib/global.c</a>:
</p>
<table class="code gl-mb-5" style="border-spacing: 0; margin-bottom: 1rem; border-collapse: collapse; width: auto; font-family: monospace; font-size: 90%;" bgcolor="#fff" width="100%" cellpadding="0" cellspacing="0">
<tr class="line_holder" style="line-height: 1.6;">
<td class="old_line diff-line-num" data-linenumber="578" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: inherit;" align="right" bgcolor="#fafafa">
578
</td>
<td class="new_line diff-line-num" data-linenumber="579" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: inherit;" align="right" bgcolor="#fafafa">
579
</td>
<td class="line_content" style="padding: inherit;"><pre style='display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dbdbdb;'> <span id="LC579" class="line" lang="c"><span class="cm" style="color: #998; font-style: italic;"> *</span></span>
</pre></td>
</tr>
<tr class="line_holder old" style="line-height: 1.6;">
<td class="old_line diff-line-num old" data-linenumber="579" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: inherit;" align="right" bgcolor="#f9d7dc">
579
</td>
<td class="new_line diff-line-num old" data-linenumber="580" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: inherit;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding: inherit;" bgcolor="#fbe9eb"><pre style='display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dbdbdb;'>-<span id="LC579" class="line" lang="c"><span class="cm" style="color: #998; font-style: italic;"> * Returns: a NUL-terminated %gnutls_library_config_st array</span></span>
</pre></td>
</tr>
<tr class="line_holder new" style="line-height: 1.6;">
<td class="old_line diff-line-num new" data-linenumber="580" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="580" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
580
</td>
<td class="line_content new" style="padding: inherit;" bgcolor="#ecfdf0"><pre style='display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dbdbdb;'>+<span id="LC580" class="line" lang="c"><span class="cm" style="color: #998; font-style: italic;"> * Returns: a NUL<span class="idiff left right addition" style="background-color: #c7f0d2;">L</span>-terminated %gnutls_library_config_st array</span></span>
</pre></td>
</tr>

</table>
<div class="md" style="border-bottom-width: 1px; border-bottom-color: #ededed; border-bottom-style: solid; padding-bottom: 1em; color: #303030; word-wrap: break-word;">
<p dir="auto" style="color: #303030; margin: 0;" align="initial">nit: it's not a typo <a href="https://en.wikipedia.org/wiki/Null_character" rel="nofollow noreferrer noopener" target="_blank" style="color: #1068bf; margin-top: 0;">https://en.wikipedia.org/wiki/Null_character</a></p>
</div>

<p style="color: #777777;">
<a href="https://gitlab.com/dueno" style="color: #1068bf;">Daiki Ueno</a>
started a new
discussion on <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1639#note_1095547152" style="color: #1068bf;">lib/global.c</a>:
</p>
<table class="code gl-mb-5" style="border-spacing: 0; margin-bottom: 1rem; border-collapse: collapse; width: auto; font-family: monospace; font-size: 90%;" bgcolor="#fff" width="100%" cellpadding="0" cellspacing="0">
<tr class="line_holder new" style="line-height: 1.6;">
<td class="old_line diff-line-num new" data-linenumber="586" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="588" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
588
</td>
<td class="line_content new" style="padding: inherit;" bgcolor="#ecfdf0"><pre style='display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dbdbdb;'>+<span id="LC588" class="line" lang="c">    <span class="k" style="font-weight: 600;">while</span> <span class="p">(</span><span class="n" style="color: #333;">strcmp</span><span class="p">(</span><span class="n" style="color: #333;">_gnutls_library_config</span><span class="p">[</span><span class="n" style="color: #333;">i</span><span class="p">].</span><span class="n" style="color: #333;">name</span><span class="p">,</span> <span class="s" style="color: #d14;">"system-config"</span><span class="p">))</span></span>
</pre></td>
</tr>
<tr class="line_holder new" style="line-height: 1.6;">
<td class="old_line diff-line-num new" data-linenumber="586" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="589" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
589
</td>
<td class="line_content new" style="padding: inherit;" bgcolor="#ecfdf0"><pre style='display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dbdbdb;'>+<span id="LC589" class="line" lang="c">            <span class="o" style="font-weight: 600;">++</span><span class="n" style="color: #333;">i</span><span class="p">;</span></span>
</pre></td>
</tr>
<tr class="line_holder new" style="line-height: 1.6;">
<td class="old_line diff-line-num new" data-linenumber="586" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="590" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: inherit;" align="right" bgcolor="#ddfbe6">
590
</td>
<td class="line_content new" style="padding: inherit;" bgcolor="#ecfdf0"><pre style='display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: inherit; border-radius: 2px; margin: 0; padding: 0; border: inherit solid #dbdbdb;'>+<span id="LC590" class="line" lang="c">    <span class="n" style="color: #333;">_gnutls_library_config</span><span class="p">[</span><span class="n" style="color: #333;">i</span><span class="p">].</span><span class="n" style="color: #333;">value</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">gnutls_get_system_config_file</span><span class="p">();</span></span>
</pre></td>
</tr>

</table>
<div class="md" style="border-bottom-width: 1px; border-bottom-color: #ededed; border-bottom-style: solid; padding-bottom: 1em; color: #303030; word-wrap: break-word;">
<p dir="auto" style="color: #303030; margin: 0 0 16px;" align="initial">Instead of introducing a side-effect, I would rather put the logic in src/cli.c, something like:</p>
<div class="gl-relative markdown-code-block js-markdown-code" style="margin-bottom: 0;">
<pre class="code highlight js-syntax-highlight language-c" lang="c" v-pre="true" style="display: block; font-size: 13px; color: #303030; line-height: 1.6em; overflow-x: auto; border-radius: 4px; position: relative; font-family: monospace; word-break: break-all; word-wrap: break-word; background-color: #fff; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; margin: 0 0 16px; padding: 12px; border: 1px solid #dbdbdb;"><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: 4px; white-space: pre; margin-top: 0; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="c" style="margin-top: 0;">        <span class="k" style="margin-top: 0; font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">HAVE_OPT</span><span class="p">(</span><span class="n" style="color: #333;">LIST_CONFIG</span><span class="p">))</span> <span class="p">{</span></span>
<span id="LC2" class="line" lang="c">                <span class="k" style="margin-top: 0; font-weight: 600;">const</span> <span class="n" style="color: #333;">gnutls_library_config_st</span> <span class="o" style="font-weight: 600;">*</span><span class="n" style="color: #333;">p</span><span class="p">;</span></span>
<span id="LC3" class="line" lang="c"></span>
<span id="LC4" class="line" lang="c">                <span class="k" style="margin-top: 0; font-weight: 600;">for</span> <span class="p">(</span><span class="n" style="color: #333;">p</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">gnutls_get_library_config</span><span class="p">();</span> <span class="n" style="color: #333;">p</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">name</span><span class="p">;</span> <span class="n" style="color: #333;">p</span><span class="o" style="font-weight: 600;">++</span><span class="p">)</span> <span class="p">{</span></span>
<span id="LC5" class="line" lang="c">                        <span class="n" style="margin-top: 0; color: #333;">log_msg</span><span class="p">(</span><span class="n" style="color: #333;">stdout</span><span class="p">,</span> <span class="s" style="color: #d14;">"%s: %s</span><span class="se" style="color: #d14;">\n</span><span class="s" style="color: #d14;">"</span><span class="p">,</span> <span class="n" style="color: #333;">p</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">name</span><span class="p">,</span> <span class="n" style="color: #333;">p</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">value</span><span class="p">);</span></span>
<span id="LC6" class="line" lang="c">                <span class="p" style="margin-top: 0;">}</span></span>
<span id="LC7" class="line" lang="c">                <span class="n" style="margin-top: 0; color: #333;">log_msg</span><span class="p">(</span><span class="n" style="color: #333;">stdout</span><span class="p">,</span> <span class="s" style="color: #d14;">"system-config: %s</span><span class="se" style="color: #d14;">\n</span><span class="s" style="color: #d14;">"</span><span class="p">,</span> <span class="n" style="color: #333;">gnutls_get_system_config_file</span><span class="p">());</span></span>
<span id="LC8" class="line" lang="c">                <span class="n" style="margin-top: 0; color: #333;">exit</span><span class="p">(</span><span class="mi" style="color: #099;">0</span><span class="p">);</span></span>
<span id="LC9" class="line" lang="c">        <span class="p" style="margin-top: 0;">}</span></span></code></pre>
<copy-code></copy-code>
</div>
</div>

</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1639" style="color: #1068bf;">view it on GitLab</a>..
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.com" style="color: #1068bf;">gitlab.com</a>. <a href="https://gitlab.com/-/sent_notifications/39190697feb6234a9341eb3fd44844ef/unsubscribe" target="_blank" rel="noopener noreferrer" style="color: #1068bf;">Unsubscribe</a> from this thread · <a href="https://gitlab.com/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link" style="color: #1068bf;">Manage all notifications</a> · <a href="https://gitlab.com/help" target="_blank" rel="noopener noreferrer" class="help-link" style="color: #1068bf;">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.com/gnutls/gnutls/-/merge_requests/1639"}}</script>


</p>
</div>
</body>
</html>