]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
It is unnecessary and rather less efficient to use memmove() everywhere; it's only...
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 20 Jun 2008 02:04:53 +0000 (02:04 +0000)
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 20 Jun 2008 02:04:53 +0000 (02:04 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9927 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/extra/m_ssl_gnutls.cpp
src/modules/extra/m_ssl_openssl.cpp

index 0eb293d27261c576e7583ff31bba9d7bf195215d..fb50c0f096c3016fdf7fb59e7690105dcbf61766 100644 (file)
@@ -543,7 +543,7 @@ class ModuleSSLGnuTLS : public Module
 
                                if(count <= length)
                                {
-                                       memmove(buffer, session->inbuf, count);
+                                       memcpy(buffer, session->inbuf, count);
                                        // Move the stuff left in inbuf to the beginning of it
                                        memmove(session->inbuf, session->inbuf + count, (length - count));
                                        // Now we need to set session->inbufoffset to the amount of data still waiting to be handed to insp.
@@ -554,7 +554,7 @@ class ModuleSSLGnuTLS : public Module
                                else
                                {
                                        // There's not as much in the inbuf as there is space in the buffer, so just copy the whole thing.
-                                       memmove(buffer, session->inbuf, length);
+                                       memcpy(buffer, session->inbuf, length);
                                        // Zero the offset, as there's nothing there..
                                        session->inbufoffset = 0;
                                        // As above
index 0c9307ae4e8e525b66adde5e3f187f695180eaab..4368c8d471b42f24c03d59b331a21ba1058764e9 100644 (file)
@@ -525,7 +525,7 @@ class ModuleSSLOpenSSL : public Module
                                {
                                        if (count <= session->inbufoffset)
                                        {
-                                               memmove(buffer, session->inbuf, count);
+                                               memcpy(buffer, session->inbuf, count);
                                                // Move the stuff left in inbuf to the beginning of it
                                                memmove(session->inbuf, session->inbuf + count, (session->inbufoffset - count));
                                                // Now we need to set session->inbufoffset to the amount of data still waiting to be handed to insp.
@@ -536,7 +536,7 @@ class ModuleSSLOpenSSL : public Module
                                        else
                                        {
                                                // There's not as much in the inbuf as there is space in the buffer, so just copy the whole thing.
-                                               memmove(buffer, session->inbuf, session->inbufoffset);
+                                               memcpy(buffer, session->inbuf, session->inbufoffset);
 
                                                readresult = session->inbufoffset;
                                                // Zero the offset, as there's nothing there..