Hello Mr.Le Cam<br><br><div class="gmail_quote">On Tue, Feb 8, 2011 at 10:07 PM, Nicolas Le Cam <span dir="ltr">&lt;<a href="mailto:niko.lecam@gmail.com">niko.lecam@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote">2011/2/8 Loïc Maury <span dir="ltr">&lt;<a href="mailto:lmaury@gmail.com" target="_blank">lmaury@gmail.com</a>&gt;</span><div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

<br>
Hello Mr.Timoshkov,<br>
<br>
Thank you for your reply.<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Loīc Maury&lt;<a href="mailto:lmaury@gmail.com" target="_blank">lmaury@gmail.com</a>&gt;  wrote:<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
After the various comments, I have modified the patch.<br>
</blockquote>
First of all set your tab size to 8, and ask your editor to not use tabs<br>
at all.<br>
</div></blockquote>
I have modified my editor, but I don&#39;t know if it &#39;s correct now ?<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">


+       TRACE(&quot;(%s, %s, %p, %d, %d)\n&quot;,debugstr_w(printer-&gt;name)<div><br>
+                 ,debugstr_w(printer-&gt;printername)<br>
+                 ,printer-&gt;backend_printer<br>
+                 ,printer-&gt;queue-&gt;ref<br>
+                 ,list_count(&amp;printer-&gt;queue-&gt;jobs));<br>
</div></blockquote><div>
TRACE() with the API parameters usually is the very first statement in<br>
the API implementation, comma should be placed at the end of the statement,<br>
not before.<br>
</div></blockquote>
Ok, I have remplaced this TRACE().<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">


+                               GetPrinterW(hPrinter, 2, NULL, 0,&amp;needed);<div><br>
+                               pi2 = HeapAlloc(GetProcessHeap(), 0, needed);<br>
+                               GetPrinterW(hPrinter, 2, (LPBYTE)pi2, needed,&amp;needed);<br>
</div></blockquote><div>
You need to check the return value of GetPrinterW() and handle the errors.<br>
</div></blockquote>
Ok<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">


+       if(pi2)<br>
+               HeapFree(GetProcessHeap(), 0, pi2);<br>
</blockquote><div>
NULL check before HeapFree() is not needed.<br>
</div></blockquote>
Ok, I have removed the NULL check.<div><br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">


+ TRACE(&quot;return %d\n&quot;, ret);<br>
</blockquote>
This trace is redundant.<br>
</blockquote></div>
Ok, I have removed this TRACE().<br>
<br>
I have make an other patch.<br>
<br>
Thank you<br>
<br>
Loīc<br>
<br>
<br><br>
<br></blockquote></div></div></div><br>Hi Loïc,<br><br>In addition to Dmitry and Andrew comments, you&#39;re adding a lot of trailing spaces (git apply output : warning: squelched 22 whitespace errors warning: 27 lines add whitespace errors.), there&#39;s also no need for an extra newline after the end label.<br>

<br></blockquote><div><br></div><div>Now, The patch is correct ?</div><div><br></div><div>Thank you </div><div><br></div><div>Loïc </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
-- <br><font color="#888888">Nicolas Le Cam<br>
</font></blockquote></div><br>