aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Thiago Macieira <thiago@macieira.org>2013-12-11 17:56:33 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-12 03:36:36 +0100
commit0a57befb690af54304fd5957f35071db33feb011 (patch)
tree27f4ab0e7aff2fca653a5df0d2432a31b8914a29
parentcb39bb5e9c8007d155f986e3e217d374d0d520cd (diff)
downloadsubsurface-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.cpp2
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);