diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-22 17:18:18 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-22 17:18:18 +0000 |
commit | 4ffd644a14fa40b758f8937b06844861009bfec1 (patch) | |
tree | 53f79a6d5efa581098363f6631d6f7170061bb93 /src/modules | |
parent | 11e0cbf4dd4356c2791ab04fcec76b58bd44567e (diff) |
Optimized out strcpys that copy empty strings (craq++)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2637 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_cloaking.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_opermd5.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 7bcfb0af2..20d60ebef 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -256,7 +256,7 @@ class ModuleCloaking : public Module int i = 0; unsigned char bytes[16]; char hash[MAXBUF]; - strcpy(hash,""); + *hash = 0; MyMD5((char*)bytes,src,strlen(src)); for (i = 0; i < 16; i++) { diff --git a/src/modules/m_opermd5.cpp b/src/modules/m_opermd5.cpp index 44b029082..2c2b51404 100644 --- a/src/modules/m_opermd5.cpp +++ b/src/modules/m_opermd5.cpp @@ -245,7 +245,7 @@ void GenHash(const char* src, char* dest) int i = 0; unsigned char bytes[16]; char hash[1024]; - strcpy(hash,""); + *hash = 0; MyMD5((char*)bytes,(void*)src,strlen(src)); for (i = 0; i < 16; i++) { |