zlibut: some log messages would try to convert char* 0 to string
This commit is contained in:
parent
7517f645b7
commit
6b3e21abf6
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
static void *allocmem(
|
static void *allocmem(
|
||||||
void *cp, /* The array to grow. may be NULL */
|
void *cp, /* The array to grow. may be NULL */
|
||||||
int sz, /* Unit size in bytes */
|
int sz, /* Unit size in bytes */
|
||||||
@ -130,18 +132,19 @@ bool inflateToBuf(const void* inp, unsigned int inlen, ZLibUtBuf& buf)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (err != Z_OK) {
|
if (err != Z_OK) {
|
||||||
LOGERR("Inflate: error " << err << " msg " << d_stream.msg << "\n");
|
LOGERR("Inflate: error " << err << " msg " <<
|
||||||
|
(d_stream.msg ? d_stream.msg : "") << endl);
|
||||||
inflateEnd(&d_stream);
|
inflateEnd(&d_stream);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((err = inflateEnd(&d_stream)) != Z_OK) {
|
if ((err = inflateEnd(&d_stream)) != Z_OK) {
|
||||||
LOGERR("Inflate: inflateEnd error " << err << " msg " << d_stream.msg
|
LOGERR("Inflate: inflateEnd error " << err << " msg " <<
|
||||||
<< "\n");
|
(d_stream.msg ? d_stream.msg : "") << endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
buf.m->datacnt = d_stream.total_out;
|
buf.m->datacnt = d_stream.total_out;
|
||||||
LOGDEB1("inflateToBuf: ok, output size " << buf.getCnt() << "\n");
|
LOGDEB1("inflateToBuf: ok, output size " << buf.getCnt() << endl);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user