summaryrefslogtreecommitdiff
path: root/src/inspircd_io.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-26 21:55:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-26 21:55:04 +0000
commitf063862950bfa3c5a30f9e6101bd2d74b359b6c0 (patch)
tree62820177f49759bacd86c12bc124a878677e3ade /src/inspircd_io.cpp
parentda3134547f97127bc92eeac76a9a8dece4a3e07e (diff)
Valgrind fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3353 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd_io.cpp')
-rw-r--r--src/inspircd_io.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index 5e5234635..10eeca525 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -881,9 +881,10 @@ int ServerConfig::EnumConf(std::stringstream *config, const char* tag)
char buffer[MAXBUF], c_tag[MAXBUF], c, lastc;
int in_token, in_quotes, tptr, idx = 0;
- const char* buf = config->str().c_str();
+ std::string x = config->str();
+ const char* buf = x.c_str();
long bptr = 0;
- long len = strlen(buf);
+ long len = config->str().length();
ptr = 0;
in_token = 0;
@@ -1050,7 +1051,8 @@ int ServerConfig::ReadConf(std::stringstream *config, const char* tag, const cha
int in_token, in_quotes, tptr, idx = 0;
char* key;
- const char* buf = config->str().c_str();
+ std::string x = config->str();
+ const char* buf = x.c_str();
long bptr = 0;
long len = config->str().length();