diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-01 09:29:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-01 17:19:47 +0100 |
commit | ac402b7b3b4bd71e21ad85d3037a297582f1562a (patch) | |
tree | 0135680f80d640317530696be99f318289a9abe8 /hwpfilter | |
parent | 7fbe0f56192f7e106c560646d37fbb93b69b0446 (diff) |
coverity#707900 Uninitialized pointer field
Change-Id: Id2ea7af01708437074a54b59f16f865338cb504a
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hpara.cxx | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx index 009876b10dde..bc17e0c8cc1a 100644 --- a/hwpfilter/source/hpara.cxx +++ b/hwpfilter/source/hpara.cxx @@ -52,24 +52,30 @@ bool LineInfo::Read(HWPFile & hwpf, HWPPara *pPara) return (!hwpf.State()); } - -HWPPara::HWPPara(void) +HWPPara::HWPPara() + : _next(NULL) + , reuse_shape(0) + , nch(0) + , nline(0) + , begin_ypos(0) + , scflag(0) + , contain_cshape(0) + , etcflag(0) + , ctrlflag(0) + , pstyno(0) + , pno(0) + , linfo(NULL) + , cshapep(NULL) + , hhstr(NULL) { - _next = NULL; - linfo = NULL; - cshapep = NULL; - hhstr = NULL; - pno = 0; - + memset(&cshape, 0, sizeof(cshape)); + memset(&pshape, 0, sizeof(pshape)); } - -HWPPara::~HWPPara(void) +HWPPara::~HWPPara() { - if (linfo) - delete[]linfo; - if (cshapep) - delete[]cshapep; + delete[] linfo; + delete[] cshapep; if (hhstr) { // virtual destructor |