summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-11 09:06:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-11 09:58:36 +0000
commit556373c41fddbac6cbee1c89e7707631270a1852 (patch)
tree026862690693419beb8810fdc6671ae30c72a026 /hwpfilter
parent62b124b2704adf11a63681164d05a8eb49dfb105 (diff)
V668 no sense in testing the result of new against null
Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/drawing.h5
-rw-r--r--hwpfilter/source/hinfo.cxx3
-rw-r--r--hwpfilter/source/htags.cxx2
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;