From c7af37db60aab361e8ab01e69c816d249fb558b6 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Sun, 24 Mar 2013 20:50:41 +0900 Subject: deleting NULL is safe Change-Id: I3748d0034b2c8e9d9122ad2a9001763eb1265e1d --- idlc/source/astunion.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'idlc/source') diff --git a/idlc/source/astunion.cxx b/idlc/source/astunion.cxx index 827dbbda61eb..8a03ae5d9d4a 100644 --- a/idlc/source/astunion.cxx +++ b/idlc/source/astunion.cxx @@ -362,8 +362,7 @@ AstUnionBranch::AstUnionBranch(AstUnionLabel* pLabel, AstType const * pType, con AstUnionBranch::~AstUnionBranch() { - if ( m_pLabel ) - delete m_pLabel; + delete m_pLabel; } AstUnionLabel::AstUnionLabel(UnionLabel labelKind, AstExpression* pExpr) @@ -376,8 +375,7 @@ AstUnionLabel::AstUnionLabel(UnionLabel labelKind, AstExpression* pExpr) AstUnionLabel::~AstUnionLabel() { - if ( m_pLabelValue ) - delete m_pLabelValue; + delete m_pLabelValue; } -- cgit