diff options
author | Thiago Macieira <thiago@macieira.org> | 2013-12-11 17:56:33 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-12 03:36:36 +0100 |
commit | 0a57befb690af54304fd5957f35071db33feb011 (patch) | |
tree | 27f4ab0e7aff2fca653a5df0d2432a31b8914a29 | |
parent | cb39bb5e9c8007d155f986e3e217d374d0d520cd (diff) | |
download | subsurface-0a57befb690af54304fd5957f35071db33feb011.tar.gz |
Don't call strlen() on something we already know the size of
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index d863055ff..5f52154e1 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -165,7 +165,7 @@ static char *prepare_dives_for_divelogs(const bool selected) * transform it to divelogs.de format, finally dumping * the XML into a character buffer. */ - doc = xmlReadMemory(membuf, strlen(membuf), "divelog", NULL, 0); + xmlDoc *doc = xmlReadMemory(membuf, streamsize, "divelog", NULL, 0); if (!doc) { qDebug() << errPrefix << "xml error"; free((void *)membuf); |