<!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>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<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-size: 15px; font-weight: bold; line-height: 1.4; padding: 20px 0;">
Merge request
<a href="https://gitlab.com/gnutls/gnutls/merge_requests/1052">!1052</a>
was reviewed by
<a href="https://gitlab.com/dueno">Daiki Ueno</a>
</td>
</tr>
<tr>
<td style="overflow: hidden; font-size: 14px; line-height: 1.4; display: grid;">
<p style="color: #777777;">
<a href="https://gitlab.com/dueno">Daiki Ueno</a>
commented on a
discussion on <a href="https://gitlab.com/gnutls/gnutls/merge_requests/1052#note_201548434">lib/iov.h</a>:
</p>
<table>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="71" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
71
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC71" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="72" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
72
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC72" class="line" lang="c">             <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">iter</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">block_offset</span> <span class="o" style="font-weight: 600;">></span> <span class="mi" style="color: #099;">0</span><span class="p">)</span> <span class="p">{</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="73" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
73
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC73" class="line" lang="c">                     <span class="k" style="font-weight: 600;">if</span> <span class="p">((</span><span class="kt" style="color: #458; font-weight: 600;">size_t</span><span class="p">)</span> <span class="n" style="color: #333;">len</span> <span class="o" style="font-weight: 600;">>=</span> <span class="n" style="color: #333;">iter</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">block_size</span> <span class="o" style="font-weight: 600;">-</span> <span class="n" style="color: #333;">iter</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">block_offset</span><span class="p">)</span> <span class="p">{</span></span>
</pre>
</td>
</tr>

</table>
<div style="border-bottom-width: 1px; border-bottom-color: #ededed; border-bottom-style: solid;">
<p dir="auto">Thanks, done.</p>
</div>

<p style="color: #777777;">
<a href="https://gitlab.com/dueno">Daiki Ueno</a>
commented on a
discussion on <a href="https://gitlab.com/gnutls/gnutls/merge_requests/1052#note_201548443">lib/iov.h</a>:
</p>
<table>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="65" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
65
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC65" class="line" lang="c">             <span class="k" style="font-weight: 600;">const</span> <span class="n" style="color: #333;">giovec_t</span> <span class="o" style="font-weight: 600;">*</span><span class="n" style="color: #333;">iov</span> <span class="o" style="font-weight: 600;">=</span> <span class="o" style="font-weight: 600;">&</span><span class="n" style="color: #333;">iter</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">iov</span><span class="p">[</span><span class="n" style="color: #333;">iter</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">iov_index</span><span class="p">];</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="66" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
66
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC66" class="line" lang="c">             <span class="kt" style="color: #458; font-weight: 600;">uint8_t</span> <span class="o" style="font-weight: 600;">*</span><span class="n" style="color: #333;">p</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">iov</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">iov_base</span><span class="p">;</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="67" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
67
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC67" class="line" lang="c">             <span class="kt" style="color: #458; font-weight: 600;">ssize_t</span> <span class="n" style="color: #333;">len</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">iov</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">iov_len</span><span class="p">;</span></span>
</pre>
</td>
</tr>

</table>
<div style="border-bottom-width: 1px; border-bottom-color: #ededed; border-bottom-style: solid;">
<p dir="auto">This is a common convention throughout the code so the <code>DECR_LEN</code> macro work.</p>
</div>

<p style="color: #777777;">
<a href="https://gitlab.com/dueno">Daiki Ueno</a>
commented on a
discussion on <a href="https://gitlab.com/gnutls/gnutls/merge_requests/1052#note_201548446">lib/iov.h</a>:
</p>
<table>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="99" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
99
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC99" class="line" lang="c">             <span class="p">}</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="100" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
100
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC100" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="101" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
101
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC101" class="line" lang="c">            <span class="n" style="color: #333;">memcpy</span><span class="p">(</span><span class="n" style="color: #333;">iter</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">block</span> <span class="o" style="font-weight: 600;">+</span> <span class="n" style="color: #333;">iter</span><span class="o" style="font-weight: 600;">-></span><span class="n" style="color: #333;">block_offset</span><span class="p">,</span> <span class="n" style="color: #333;">p</span><span class="p">,</span> <span class="n" style="color: #333;">len</span><span class="p">);</span></span>
</pre>
</td>
</tr>

</table>
<div style="border-bottom-width: 1px; border-bottom-color: #ededed; border-bottom-style: solid;">
<p dir="auto">Nice, I've rewritten the blocks in a similar way.</p>
</div>

<p style="color: #777777;">
<a href="https://gitlab.com/dueno">Daiki Ueno</a>
commented on a
discussion on <a href="https://gitlab.com/gnutls/gnutls/merge_requests/1052#note_201548450">lib/iov.h</a>:
</p>
<table>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="40" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
40
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC40" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="41" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
41
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC41" class="line" lang="c"><span class="cm" style="color: #998; font-style: italic;">/* Initialize the iterator. */</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="1" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="42" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
42
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC42" class="line" lang="c"><span class="k" style="font-weight: 600;">static</span> <span class="kr" style="font-weight: 600;">inline</span> <span class="kt" style="color: #458; font-weight: 600;">int</span></span>
</pre>
</td>
</tr>

</table>
<div style="border-bottom-width: 1px; border-bottom-color: #ededed; border-bottom-style: solid;">
<p dir="auto">Moved to <code>iov.c</code>.</p>
</div>

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

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

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/merge_requests/1052">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/sent_notifications/3c7b6f0e403121798d4f7490ea6563c2/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<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/1052"}}</script>


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