summaryrefslogtreecommitdiff
path: root/registry/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-11 13:20:49 +0200
committerNoel Grandin <noel@peralex.com>2015-02-23 09:26:58 +0200
commitba233e87efddf0a6751b35784dca1c805364ff3b (patch)
tree9d7c8a4256e688c2d47cb6ecf580ac196c4da2c0 /registry/tools
parenta2fa9e2468aa5c4fd4b610c5d0ebc8959e87a072 (diff)
remove unnecessary parenthesis in return statements
found with $ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;' Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
Diffstat (limited to 'registry/tools')
-rw-r--r--registry/tools/options.cxx6
-rw-r--r--registry/tools/regcompare.cxx24
-rw-r--r--registry/tools/regmerge.cxx16
-rw-r--r--registry/tools/regview.cxx2
4 files changed, 24 insertions, 24 deletions
diff --git a/registry/tools/options.cxx b/registry/tools/options.cxx
index 4e918ec1b6e9..30d58d50d044 100644
--- a/registry/tools/options.cxx
+++ b/registry/tools/options.cxx
@@ -74,7 +74,7 @@ bool Options::checkArgument(std::vector< std::string> & rArgs, char const * arg,
break;
}
}
- return (result);
+ return result;
}
// static
@@ -84,7 +84,7 @@ bool Options::checkCommandFile(std::vector< std::string > & rArgs, char const *
if (fp == 0)
{
fprintf(stderr, "ERROR: Can't open command file \"%s\"\n", filename);
- return (false);
+ return false;
}
std::string buffer;
@@ -123,7 +123,7 @@ bool Options::checkCommandFile(std::vector< std::string > & rArgs, char const *
break;
}
}
- return (fclose(fp) == 0);
+ return fclose(fp) == 0;
}
bool Options::initOptions (std::vector< std::string > & rArgs)
diff --git a/registry/tools/regcompare.cxx b/registry/tools/regcompare.cxx
index 191aa1859e6a..032762d228ea 100644
--- a/registry/tools/regcompare.cxx
+++ b/registry/tools/regcompare.cxx
@@ -52,7 +52,7 @@ public:
std::string const & getRegName1() const { return m_regName1; }
std::string const & getRegName2() const { return m_regName2; }
- bool isStartKeyValid() const { return (!m_startKey.isEmpty()); }
+ bool isStartKeyValid() const { return !m_startKey.isEmpty(); }
OUString const & getStartKey() const { return m_startKey; }
bool matchedWithExcludeKey( const OUString& keyName) const;
@@ -1963,12 +1963,12 @@ int _cdecl main( int argc, char * argv[] )
{
// failure.
options.printUsage();
- return (1);
+ return 1;
}
}
if (!options.initOptions(args))
{
- return (1);
+ return 1;
}
OUString regName1( convertToFileUrl(options.getRegName1().c_str(), options.getRegName1().size()) );
@@ -1979,13 +1979,13 @@ int _cdecl main( int argc, char * argv[] )
{
fprintf(stdout, "%s: open registry \"%s\" failed\n",
options.getProgramName().c_str(), options.getRegName1().c_str());
- return (2);
+ return 2;
}
if ( reg2.open(regName2, REG_READONLY) )
{
fprintf(stdout, "%s: open registry \"%s\" failed\n",
options.getProgramName().c_str(), options.getRegName2().c_str());
- return (3);
+ return 3;
}
RegistryKey key1, key2;
@@ -1993,13 +1993,13 @@ int _cdecl main( int argc, char * argv[] )
{
fprintf(stdout, "%s: open root key of registry \"%s\" failed\n",
options.getProgramName().c_str(), options.getRegName1().c_str());
- return (4);
+ return 4;
}
if ( reg2.openRootKey(key2) )
{
fprintf(stdout, "%s: open root key of registry \"%s\" failed\n",
options.getProgramName().c_str(), options.getRegName2().c_str());
- return (5);
+ return 5;
}
if ( options.isStartKeyValid() )
@@ -2008,20 +2008,20 @@ int _cdecl main( int argc, char * argv[] )
{
fprintf(stdout, "%s: start key is equal to one of the exclude keys\n",
options.getProgramName().c_str());
- return (6);
+ return 6;
}
RegistryKey sk1, sk2;
if ( key1.openKey(options.getStartKey(), sk1) )
{
fprintf(stdout, "%s: open start key of registry \"%s\" failed\n",
options.getProgramName().c_str(), options.getRegName1().c_str());
- return (7);
+ return 7;
}
if ( key2.openKey(options.getStartKey(), sk2) )
{
fprintf(stdout, "%s: open start key of registry \"%s\" failed\n",
options.getProgramName().c_str(), options.getRegName2().c_str());
- return (8);
+ return 8;
}
key1 = sk1;
@@ -2051,13 +2051,13 @@ int _cdecl main( int argc, char * argv[] )
{
fprintf(stdout, "%s: closing registry \"%s\" failed\n",
options.getProgramName().c_str(), options.getRegName1().c_str());
- return (9);
+ return 9;
}
if ( reg2.close() )
{
fprintf(stdout, "%s: closing registry \"%s\" failed\n",
options.getProgramName().c_str(), options.getRegName2().c_str());
- return (10);
+ return 10;
}
return ((nError > 0) ? 11 : 0);
diff --git a/registry/tools/regmerge.cxx b/registry/tools/regmerge.cxx
index 407849c5b914..0a712cae987b 100644
--- a/registry/tools/regmerge.cxx
+++ b/registry/tools/regmerge.cxx
@@ -94,17 +94,17 @@ int __cdecl main( int argc, char * argv[] )
if (!Options::checkArgument(args, argv[i], strlen(argv[i])))
{
options.printUsage();
- return (1);
+ return 1;
}
}
if (!options.initOptions(args))
{
- return (1);
+ return 1;
}
if (args.size() < 3)
{
options.printUsage();
- return (1);
+ return 1;
}
Registry reg;
@@ -115,7 +115,7 @@ int __cdecl main( int argc, char * argv[] )
{
if (options.isVerbose())
fprintf(stderr, "open registry \"%s\" failed\n", args[0].c_str());
- return (-1);
+ return -1;
}
}
@@ -124,7 +124,7 @@ int __cdecl main( int argc, char * argv[] )
{
if (options.isVerbose())
fprintf(stderr, "open root key of registry \"%s\" failed\n", args[0].c_str());
- return (-4);
+ return -4;
}
OUString mergeKeyName( OUString::createFromAscii(args[1].c_str()) );
@@ -145,7 +145,7 @@ int __cdecl main( int argc, char * argv[] )
if (options.isVerbose())
fprintf(stderr, "ERROR: merging registry \"%s\" under key \"%s\" in registry \"%s\" failed.\n",
args[i].c_str(), args[1].c_str(), args[0].c_str());
- return (-2);
+ return -2;
}
}
else
@@ -161,10 +161,10 @@ int __cdecl main( int argc, char * argv[] )
{
if (options.isVerbose())
fprintf(stderr, "closing registry \"%s\" failed\n", args[0].c_str());
- return (-5);
+ return -5;
}
- return(0);
+ return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/registry/tools/regview.cxx b/registry/tools/regview.cxx
index bdd72b22bb6b..16b1b17a5060 100644
--- a/registry/tools/regview.cxx
+++ b/registry/tools/regview.cxx
@@ -98,7 +98,7 @@ int __cdecl main( int argc, char * argv[] )
exit(1);
}
- return(0);
+ return 0;
}