<br><br><div class="gmail_quote">On Sun, May 6, 2012 at 3:09 AM, Dieter Adriaenssens <span dir="ltr"><<a href="mailto:dieter.adriaenssens@gmail.com" target="_blank">dieter.adriaenssens@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Madhura,<br>
<br>
In a file you introduced (libraries/import/shp.php), on line 166, the<br>
same method with similar parameters is called as the line above :<br>
<br>
        function _loadHeaders()<br>
        {<br>
            $this->recordNumber = loadData("N", readFromBuffer(4));<br>
            //We read the length of the record<br>
            $tmp = loadData("N", readFromBuffer(4));<br>
            $this->shapeType = loadData("V", readFromBuffer(4));<br>
        }<br>
<br>
nothing happens with the $tmp afterwards, so I'm wondering if this<br>
duplicate method call can be removed?<br>
Or is there a reason for calling this method twice?<br>
<br>
--<br>
Kind regards,<br>
<br>
Dieter Adriaenssens<br><br></blockquote><div>Hi Dieter,</div><div><br></div><div>Thanks for pointing that out.</div><div>The second function call basically read 4 bytes that are not used, so the pointer is incremented to the required location.</div>
<div>There is not need to assign the content read to a variable, so I've changed it with commit <span style="background-color:rgb(255,255,255);color:rgb(68,68,68);font-family:Monaco,'Courier New','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:11px;line-height:15px">f286156c8</span> [1]</div>
<div><br></div><div>[1] <a href="https://github.com/phpmyadmin/phpmyadmin/commit/f286156c8e41f57d2dcccc4bb08cc2ca4ccdec8d">https://github.com/phpmyadmin/phpmyadmin/commit/f286156c8e41f57d2dcccc4bb08cc2ca4ccdec8d</a></div>
<div><br></div></div>-- <br>Thanks and Regards,<div><br></div><div>Madhura Jayaratne<br><div><br></div></div><br>