提交 9bc2f88d 编写于 作者: L liuxu 提交者: Liu Jiaming

location_compression: safety review to init struct

location: fix code style

location: init struct z_stream

location: init z_stream

location: fix header order
上级 e281f285
......@@ -15,11 +15,11 @@
*****************************************************************************/
#include "modules/localization/msf/common/util/compression.h"
#include <cstring>
#include <zlib.h>
#include "cyber/common/log.h"
namespace apollo {
namespace localization {
namespace msf {
......@@ -102,11 +102,8 @@ int ZlibStrategy::ZlibUncompress(BufferStr* src, BufferStr* dst) {
unsigned int dst_idx = 0;
/* allocate inflate state */
stream_data.zalloc = Z_NULL;
stream_data.zfree = Z_NULL;
stream_data.opaque = Z_NULL;
stream_data.avail_in = 0;
stream_data.next_in = Z_NULL;
memset(&stream_data, 0, sizeof(z_stream));
ret = inflateInit(&stream_data);
if (ret != Z_OK) {
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册