<div>It looks like a well needed patch!! I am going to apply it to mine. I dont have commit on repo either!!!</div>
<div>Committers pl. take a look!!<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 4/6/07, <b class="gmail_sendername">Tim Yardley</b> &lt;<a href="mailto:liquid@haveheart.com">liquid@haveheart.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">I don&#39;t have commit on the repo, so it is not checked in.&nbsp; Anyone that does have anything to say about the patch or body of the email?&nbsp; </font>
</span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span>&nbsp;</div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">You are welcome to apply it if you&#39;d like.</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span>&nbsp;</div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">/tmy</font></span></div><br>
<div lang="en-us" dir="ltr" align="left">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rkmr.em@gmail.com" target="_blank">rkmr.em@gmail.com</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rkmr.em@gmail.com" target="_blank">
rkmr.em@gmail.com</a>] <br><b>Sent:</b> Friday, April 06, 2007 5:52 PM<br><b>To:</b> Tim Yardley<br><b>Cc:</b> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:memcached@lists.danga.com" target="_blank">
memcached@lists.danga.com</a><br><b>Subject:</b> Re: PATCH: code cleanup<br></font><br>&nbsp;</div>
<div><span class="e" id="q_111c95703a96cb57_1">
<div></div>
<div>is this checked in svn or do i need to apply this patch?</div>
<div>thanks<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 4/5/07, <b class="gmail_sendername">Tim Yardley</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:liquid@haveheart.com" target="_blank">liquid@haveheart.com</a>
&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">All;<br><br>Attached is a patch against the multithreaded branch that cleans up spacing<br>issues bringing the codebase to a hopefully consistent style.&nbsp;&nbsp;It also 
<br>addresses -Wall warnings, some null checks (a TODO item iirc), and adds<br>asserts at the top of each function for any use of conn *c without checking<br>to see if c is NULL first.<br><br>Hopefully those asserts are not necessary as we all write perfect code... 
<br>Right?&nbsp;&nbsp;Anyway, that conn object is used and passed around enough that it<br>should be checked.<br><br>Note that there are a couple other areas that could be addressed on an<br>optimization level.&nbsp;&nbsp;I addressed a few like multiple assignments to a 
<br>variable where not needed, elimination of unused variables, value assignment<br>at initiation where it made sense, #ifdef where a function wont be used,<br>etc.<br><br>Other things that I noticed that could be addressed but require consensus: 
<br>- optimization of the switch statements to leverage jump tables at<br>compilation<br>- focusing on popular default cases at the top of the switch to reduce<br>comparisons<br>- restructing switch statements if necessary to support that under 
<br>different compilers (nesting the switches)<br>- visiting the usage of char vs int (byte alignment, powers of two<br>padding, etc)<br>- inlining some of the smaller functions (candidates would include some of<br>the item funtions, etc) 
<br><br><br>A couple of the malloc cases in there looked potentially troubling<br>(arbitrary values chosen, and some potential other misallocations) but I<br>didn&#39;t spend the time to fully analyze them.&nbsp;&nbsp;Does anyone have access to one 
<br>of the commercial source audit applications that would like to run memcached<br>through it?&nbsp;&nbsp;If not, would anyone be interested in me persuing that avenue<br>with some of the vendors that have offered to run their commercial 
<br>applications on opensource software?<br><br>Feedback welcome.<br><br>/tmy<br><br></blockquote></div><br></span></div></div></blockquote></div><br>