<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/110139/">http://git.reviewboard.kde.org/r/110139/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On April 25th, 2013, 10:39 a.m. UTC, <b>MatÄ›j Laitl</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/110139/diff/1/?file=140662#file140662line172" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/daap/daapreader/authentication/md5.c</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void OpenDaap_MD5Final(MD5_CTX *ctx, unsigned char digest[16])</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">172</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">memset</span><span class="p">(</span><span class="n">ctx</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n"><span class="hl">ctx</span></span><span class="p">));</span>     <span class="cm">/* In case it's sensitive */</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">172</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">memset</span><span class="p">(</span><span class="n">ctx</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n"><span class="hl">MD5_CTX</span></span><span class="p">));</span>     <span class="cm">/* In case it's sensitive */</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Nice catch. Wouldn't be sizeof(*ctx) more future-proof? (think of changes of the ctx type)</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yeah, it actually would; I made it use explicit type to be consistent with other sizeof() in this code. Now I changed both of them. :-)

I think it's worthy of note that because of type-punning (and in C++ - polymorphy) this is not necessarily an universal approach, though.</pre>
<br />




<p>- Konrad</p>


<br />
<p>On April 27th, 2013, 10:11 p.m. UTC, Konrad Zemek wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Amarok.</div>
<div>By Konrad Zemek.</div>


<p style="color: grey;"><i>Updated April 27, 2013, 10:11 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Small bugfixes. Fixes clang warnings.

A few legitimate, non critical bugs. Also minor changes to explicitly cover all enums in switch statements.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Changed lines no longer generate warnings.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/browsers/playlistbrowser/PlaylistBrowserView.cpp <span style="color: grey">(fc7fe14a10ae0f4b25f9b0e0ccb85c246b82313d)</span></li>

 <li>src/core-impl/collections/daap/daapreader/authentication/md5.c <span style="color: grey">(089118ff8bcd20aecade257c31d56a0447fc04de)</span></li>

 <li>src/core-impl/collections/db/sql/SqlQueryMaker.cpp <span style="color: grey">(fc5f6df29d9e22a97712a31b2aa71bc0e6424b40)</span></li>

 <li>src/core-impl/collections/upnpcollection/UpnpQueryMaker.cpp <span style="color: grey">(93e068124beae4ba4f294e476d696cc0196dd298)</span></li>

 <li>src/dialogs/EditFilterDialog.cpp <span style="color: grey">(ac26497dcc5e5cf7cb9e2ea1a821dbce83276d34)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/110139/diff/" style="margin-left: 3em;">View Diff</a></p>







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








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