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:
parent
cb39bb5e9c
commit
0a57befb69
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user