diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-11 09:06:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-11 09:58:36 +0000 |
commit | 556373c41fddbac6cbee1c89e7707631270a1852 (patch) | |
tree | 026862690693419beb8810fdc6671ae30c72a026 /hwpfilter | |
parent | Ensure RTTI symbol visibility for Linux Clang -fsanitize=function,vptr (diff) | |
download | core-556373c41fddbac6cbee1c89e7707631270a1852.tar.gz core-556373c41fddbac6cbee1c89e7707631270a1852.zip |
V668 no sense in testing the result of new against null
Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/drawing.h | 5 | ||||
-rw-r--r-- | hwpfilter/source/hinfo.cxx | 3 | ||||
-rw-r--r-- | hwpfilter/source/htags.cxx | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h index 66b111a1cca1..9a9e7b4b5fc1 100644 --- a/hwpfilter/source/drawing.h +++ b/hwpfilter/source/drawing.h @@ -363,10 +363,7 @@ static HWPDrawingObject *LoadDrawingObject(void) head = prev = NULL; do { - if ((hdo = new HWPDrawingObject) == NULL) - { - goto error; - } + hdo = new HWPDrawingObject; if (!LoadCommonHeader(hdo, &link_info)) { goto error; diff --git a/hwpfilter/source/hinfo.cxx b/hwpfilter/source/hinfo.cxx index 3a5bb21d7429..0c2afb67a718 100644 --- a/hwpfilter/source/hinfo.cxx +++ b/hwpfilter/source/hinfo.cxx @@ -165,8 +165,7 @@ bool HWPInfo::Read(HWPFile & hwpf) { info_block = new unsigned char[info_block_len + 1]; - if (0 == info_block || - !HWPReadInfoBlock(info_block, info_block_len, hwpf)) + if (!HWPReadInfoBlock(info_block, info_block_len, hwpf)) return false; } diff --git a/hwpfilter/source/htags.cxx b/hwpfilter/source/htags.cxx index 6283e77ac479..2629479f702b 100644 --- a/hwpfilter/source/htags.cxx +++ b/hwpfilter/source/htags.cxx @@ -112,7 +112,7 @@ bool OlePicture::Read(HWPFile & hwpf) return false; #ifdef WIN32 char *data = new char[size]; - if( data == 0 || hwpf.ReadBlock(data,size) == 0 ) + if (hwpf.ReadBlock(data,size) == 0) { delete [] data; return false; |