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>
This commit is contained in:
Thiago Macieira 2013-12-11 17:56:33 -08:00 committed by Dirk Hohndel
parent cb39bb5e9c
commit 0a57befb69

View file

@ -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);