summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--idlc/source/options.cxx6
-rw-r--r--idlc/source/parser.y9
2 files changed, 7 insertions, 8 deletions
diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx
index 9a3eee6daf47..0d02236cac47 100644
--- a/idlc/source/options.cxx
+++ b/idlc/source/options.cxx
@@ -69,14 +69,16 @@ bool Options::checkArgument (std::vector< std::string > & rArgs, char const * ar
switch(arg[0])
{
case '@':
- if ((result = (len > 1)))
+ result = len > 1;
+ if (result)
{
// "@<cmdfile>"
result = Options::checkCommandFile (rArgs, &(arg[1]));
}
break;
case '-':
- if ((result = (len > 1)))
+ result = len > 1;
+ if (result)
{
// "-<option>"
switch (arg[1])
diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index 6e7bf785154f..5589e7482607 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -445,12 +445,11 @@ module_dcl :
AstScope* pScope = idlc()->scopes()->topNonNull();
AstModule* pModule = nullptr;
- AstDeclaration* pExists = nullptr;
if ( pScope )
{
pModule = new AstModule(*$3, pScope);
- if( (pExists = pScope->lookupForAdd(pModule)) )
+ if( AstDeclaration* pExists = pScope->lookupForAdd(pModule) )
{
pExists->setInMainfile(idlc()->isInMainFile());
pExists->setFileName(pModule->getFileName());
@@ -556,7 +555,6 @@ interface_dcl :
AstScope* pScope = idlc()->scopes()->topNonNull();
AstInterface* pInterface = nullptr;
AstInterface* pForward = nullptr;
- AstDeclaration* pDecl = nullptr;
/*
* Make a new interface node and add it to its enclosing scope
@@ -566,7 +564,7 @@ interface_dcl :
pInterface = new AstInterface(
*$1->getName(),
static_cast< AstInterface const * >(resolveTypedefs($1->getInherits())), pScope);
- if ( (pDecl = pScope->lookupByName(pInterface->getScopedName())) )
+ if ( AstDeclaration* pDecl = pScope->lookupByName(pInterface->getScopedName()) )
{
/*
* See if we're defining a forward declared interface.
@@ -1279,12 +1277,11 @@ constants_dcl :
AstScope* pScope = idlc()->scopes()->topNonNull();
AstConstants* pConstants = nullptr;
- AstDeclaration* pExists = nullptr;
if ( pScope )
{
pConstants = new AstConstants(*$3, pScope);
- if( (pExists = pScope->lookupForAdd(pConstants)) )
+ if( AstDeclaration* pExists = pScope->lookupForAdd(pConstants) )
{
pExists->setInMainfile(idlc()->isInMainFile());
delete(pConstants);