[Xorp-hackers] [PATCH 4/8] trivial: automated ws fixes
igorm at etf.rs
igorm at etf.rs
Tue Mar 20 10:02:43 PDT 2012
From: Igor Maravic <igorm at etf.rs>
Signed-off-by: Igor Maravic <igorm at etf.rs>
---
xorp/fea/data_plane/ifconfig/ifconfig_set.cc | 6 ++--
xorp/rtrmgr/cli.cc | 42 +++++++++++++-------------
xorp/rtrmgr/master_conf_tree_node.cc | 38 +++++++++++-----------
xorp/rtrmgr/master_conf_tree_node.hh | 14 ++++----
xorp/rtrmgr/module_command.cc | 4 +-
5 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/xorp/fea/data_plane/ifconfig/ifconfig_set.cc b/xorp/fea/data_plane/ifconfig/ifconfig_set.cc
index 9dc37a9..6965c41 100644
--- a/xorp/fea/data_plane/ifconfig/ifconfig_set.cc
+++ b/xorp/fea/data_plane/ifconfig/ifconfig_set.cc
@@ -7,13 +7,13 @@
// 1991 as published by the Free Software Foundation. Redistribution
// and/or modification of this program under the terms of any other
// version of the GNU General Public License is not permitted.
-//
+//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
// see the GNU General Public License, Version 2, a copy of which can be
// found in the XORP LICENSE.gpl file.
-//
+//
// XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
// http://xorp.net
@@ -333,7 +333,7 @@ IfConfigSet::push_config(const IfTree& iftree)
if (error_reporter.error_count() != 0)
return (XORP_ERROR);
-
+
return (XORP_OK);
}
diff --git a/xorp/rtrmgr/cli.cc b/xorp/rtrmgr/cli.cc
index 7f42bec..edb5a95 100644
--- a/xorp/rtrmgr/cli.cc
+++ b/xorp/rtrmgr/cli.cc
@@ -7,13 +7,13 @@
// 1991 as published by the Free Software Foundation. Redistribution
// and/or modification of this program under the terms of any other
// version of the GNU General Public License is not permitted.
-//
+//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
// see the GNU General Public License, Version 2, a copy of which can be
// found in the XORP LICENSE.gpl file.
-//
+//
// XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
// http://xorp.net
@@ -183,7 +183,7 @@ RouterCLI::RouterCLI(XorpShellBase& xorpsh, CliNode& cli_node,
// internationalization.
//
_help_o["configure"] = "Switch to configuration mode";
- _help_o["configure exclusive"]
+ _help_o["configure exclusive"]
= "Switch to configuration mode, locking out other users";
_help_o["exit"] = "Exit this command session";
_help_o["help"] = "Provide help with commands";
@@ -195,7 +195,7 @@ RouterCLI::RouterCLI(XorpShellBase& xorpsh, CliNode& cli_node,
_help_c["edit"] = "Edit a sub-element";
_help_c["exit"] = "Exit from this configuration level";
_help_c["exit configuration-mode"] = "Exit from configuration mode";
- _help_c["exit discard"]
+ _help_c["exit discard"]
= "Exit from configuration mode, discarding changes";
_help_c["help"] = "Provide help with commands";
_help_c["load"] = "Load configuration from a file";
@@ -582,7 +582,7 @@ RouterCLI::done() const
return (true);
}
-string
+string
RouterCLI::get_help_o(const string& s) const
{
map<string,string>::const_iterator i = _help_o.find(s);
@@ -593,7 +593,7 @@ RouterCLI::get_help_o(const string& s) const
return i->second;
}
-string
+string
RouterCLI::get_help_c(const string& s) const
{
map<string,string>::const_iterator i = _help_c.find(s);
@@ -728,7 +728,7 @@ RouterCLI::add_op_mode_commands(CliCommand* com0, string& error_msg)
return (XORP_OK);
}
-map<string, CliCommandMatch>
+map<string, CliCommandMatch>
RouterCLI::op_mode_help(const vector<string>& command_global_name) const
{
string command_name;
@@ -1171,7 +1171,7 @@ RouterCLI::config_changed_by_other_user()
{
if (! is_config_mode()) {
// XXX: we care about the changes only if we are in config mode
- return;
+ return;
}
//
@@ -1748,7 +1748,7 @@ RouterCLI::new_config_user(uid_t user_id)
string user_name = get_user_name(user_id);
if (user_name.empty())
user_name = c_format("UID:%u", XORP_UINT_CAST(user_id));
-
+
string alert = c_format("User %s entered configuration mode\n",
user_name.c_str());
notify_user(alert, false /* not urgent */);
@@ -1815,7 +1815,7 @@ RouterCLI::op_help_func(const string& ,
if (i != _help_long_o.end()) {
cli_client()->cli_print("\n" + i->second + "\n\n");
return (XORP_OK);
- }
+ }
//
// There was no long help description available. If there's a
@@ -1862,7 +1862,7 @@ RouterCLI::conf_help_func(const string& ,
if (i != _help_long_c.end()) {
cli_client()->cli_print("\n" + i->second + "\n\n");
return (XORP_OK);
- }
+ }
//
// There was no long help description available. If there's a
@@ -2311,7 +2311,7 @@ RouterCLI::text_entry_func(const string& ,
for (cti = ctn->children().begin();
cti != ctn->children().end(); ++cti) {
if ((*cti)->segname() == new_path_segments.front()) {
- XLOG_TRACE(_verbose, "Found pre-existing node: %s\n",
+ XLOG_TRACE(_verbose, "Found pre-existing node: %s\n",
(*cti)->segname().c_str());
ConfigTreeNode *existing_ctn = (*cti);
ctn = (SlaveConfigTreeNode*)(existing_ctn);
@@ -2326,7 +2326,7 @@ RouterCLI::text_entry_func(const string& ,
}
if (value_expected) {
// We're expecting a value here
- if (new_path_segments.front() == "{"
+ if (new_path_segments.front() == "{"
|| new_path_segments.front() == "}" ) {
error_msg = c_format("ERROR: a value for \"%s\" "
"is required.\n",
@@ -2388,13 +2388,13 @@ RouterCLI::text_entry_func(const string& ,
error_msg += c_format(" Allowed type(s): %s.",
cand_types.c_str());
}
- error_msg += "\n";
+ error_msg += "\n";
cli_client()->cli_print(error_msg);
goto cleanup;
}
path_segments.push_back(value);
XLOG_TRACE(_verbose, "creating node %s\n", value.c_str());
- ctn = new SlaveConfigTreeNode(value,
+ ctn = new SlaveConfigTreeNode(value,
makepath(path_segments),
data_ttn, ctn,
ConfigNodeId::ZERO(),
@@ -2492,7 +2492,7 @@ RouterCLI::text_entry_func(const string& ,
cli_client()->cli_print("ERROR: mismatched \"}\".\n");
goto cleanup;
}
- XLOG_TRACE(_verbose, "braces: %u ctn depth: %u ctn: %s\n",
+ XLOG_TRACE(_verbose, "braces: %u ctn depth: %u ctn: %s\n",
XORP_UINT_CAST(_braces.back()),
ctn->depth(), ctn->segname().c_str());
while (ctn->depth() > _braces.back()) {
@@ -2501,7 +2501,7 @@ RouterCLI::text_entry_func(const string& ,
//appropriately before we can handle this correctly.
ctn = ctn->parent();
XLOG_TRACE(_verbose, "jumping out one level\n");
- XLOG_TRACE(_verbose, "braces: %u ctn depth: %u ctn: %s\n",
+ XLOG_TRACE(_verbose, "braces: %u ctn depth: %u ctn: %s\n",
XORP_UINT_CAST(_braces.back()),
ctn->depth(), ctn->segname().c_str());
}
@@ -2566,7 +2566,7 @@ RouterCLI::text_entry_func(const string& ,
}
XLOG_TRACE(_verbose, "creating node %s\n", ttn->segname().c_str());
- ctn = new SlaveConfigTreeNode(ttn->segname(),
+ ctn = new SlaveConfigTreeNode(ttn->segname(),
makepath(path_segments),
ttn, ctn,
ConfigNodeId::ZERO(),
@@ -2654,7 +2654,7 @@ RouterCLI::text_entry_func(const string& ,
return (XORP_ERROR);
}
-map<string, CliCommandMatch>
+map<string, CliCommandMatch>
RouterCLI::text_entry_children_func(const vector<string>& vector_path) const
{
string command_name;
@@ -2712,7 +2712,7 @@ RouterCLI::text_entry_children_func(const vector<string>& vector_path) const
ttn = template_tree()->find_node(path_segments);
if (ttn != NULL && (! ttn->is_deprecated()) && (! ttn->is_user_hidden())) {
list<TemplateTreeNode*>::const_iterator tti;
- for (tti = ttn->children().begin(); tti != ttn->children().end();
+ for (tti = ttn->children().begin(); tti != ttn->children().end();
++tti) {
const TemplateTreeNode* ttn_child = *tti;
// XXX: ignore deprecated subtrees
@@ -2766,7 +2766,7 @@ RouterCLI::text_entry_children_func(const vector<string>& vector_path) const
ccm.set_is_argument_expected(true);
children.insert(make_pair(command_name, ccm));
}
-
+
if (ttn->is_leaf_value() && (! ttn->is_tag())
&& ttn->allowed_values().empty()
&& ttn->allowed_ranges().empty()) {
diff --git a/xorp/rtrmgr/master_conf_tree_node.cc b/xorp/rtrmgr/master_conf_tree_node.cc
index 1b350ce..170b5f2 100644
--- a/xorp/rtrmgr/master_conf_tree_node.cc
+++ b/xorp/rtrmgr/master_conf_tree_node.cc
@@ -8,13 +8,13 @@
// 1991 as published by the Free Software Foundation. Redistribution
// and/or modification of this program under the terms of any other
// version of the GNU General Public License is not permitted.
-//
+//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
// see the GNU General Public License, Version 2, a copy of which can be
// found in the XORP LICENSE.gpl file.
-//
+//
// XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
// http://xorp.net
@@ -44,13 +44,13 @@ MasterConfigTreeNode::MasterConfigTreeNode(bool verbose)
}
MasterConfigTreeNode::MasterConfigTreeNode(const string& nodename,
- const string& path,
+ const string& path,
const TemplateTreeNode* ttn,
MasterConfigTreeNode* parent,
const ConfigNodeId& node_id,
uid_t user_id,
bool verbose)
- : ConfigTreeNode(nodename, path, ttn, parent, node_id, user_id,
+ : ConfigTreeNode(nodename, path, ttn, parent, node_id, user_id,
/* clientid */ 0, verbose),
_actions_pending(0),
_actions_succeeded(true),
@@ -68,8 +68,8 @@ MasterConfigTreeNode::MasterConfigTreeNode(const MasterConfigTreeNode& ctn)
ConfigTreeNode*
MasterConfigTreeNode::create_node(const string& segment, const string& path,
- const TemplateTreeNode* ttn,
- ConfigTreeNode* parent_node,
+ const TemplateTreeNode* ttn,
+ ConfigTreeNode* parent_node,
const ConfigNodeId& node_id,
uid_t user_id,
uint32_t clientid,
@@ -83,7 +83,7 @@ MasterConfigTreeNode::create_node(const string& segment, const string& path,
if (parent_node != NULL)
XLOG_ASSERT(parent != NULL);
- new_node = new MasterConfigTreeNode(segment, path, ttn, parent,
+ new_node = new MasterConfigTreeNode(segment, path, ttn, parent,
node_id, user_id, verbose);
return reinterpret_cast<ConfigTreeNode*>(new_node);
}
@@ -316,7 +316,7 @@ MasterConfigTreeNode::find_all_modules(set<string>& all_modules) const
}
}
-void
+void
MasterConfigTreeNode::initialize_commit()
{
_actions_pending = 0;
@@ -394,7 +394,7 @@ MasterConfigTreeNode::commit_changes(TaskManager& task_manager,
if (_template_tree_node != NULL) {
// Do we have to start any modules to implement this functionality
base_cmd = _template_tree_node->const_command("%modinfo");
- const ModuleCommand* modcmd
+ const ModuleCommand* modcmd
= dynamic_cast<const ModuleCommand*>(base_cmd);
if (modcmd != NULL) {
if (modcmd->start_transaction(*this, task_manager) != XORP_OK) {
@@ -420,7 +420,7 @@ MasterConfigTreeNode::commit_changes(TaskManager& task_manager,
// (_value_committed == false)
//
XLOG_ASSERT(_existence_committed);
- XLOG_ASSERT(!_value_committed);
+ XLOG_ASSERT(!_value_committed);
base_cmd = _template_tree_node->const_command("%delete");
if (base_cmd != NULL) {
cmd = reinterpret_cast<const Command*>(base_cmd);
@@ -446,7 +446,7 @@ MasterConfigTreeNode::commit_changes(TaskManager& task_manager,
base_cmd = _template_tree_node->const_command("%allow");
if (base_cmd == NULL) {
// Try allow-range
- base_cmd
+ base_cmd
= _template_tree_node->const_command("%allow-range");
}
if (base_cmd != NULL) {
@@ -473,7 +473,7 @@ MasterConfigTreeNode::commit_changes(TaskManager& task_manager,
}
}
// Check that the operator is OK
- base_cmd =
+ base_cmd =
_template_tree_node->const_command("%allow-operator");
if (base_cmd == NULL) {
/* no explicit command, so only ":" is allowed */
@@ -481,7 +481,7 @@ MasterConfigTreeNode::commit_changes(TaskManager& task_manager,
error_msg = c_format("Bad operator for \"%s\": "
"operator %s was specified, "
"only ':' is allowed\n",
- path().c_str(),
+ path().c_str(),
operator_to_str(_operator).c_str());
error_msg += "No changes have been committed. ";
error_msg += "Correct this error and try again.";
@@ -551,7 +551,7 @@ MasterConfigTreeNode::commit_changes(TaskManager& task_manager,
string child_error_msg;
MasterConfigTreeNode *child = (MasterConfigTreeNode*)(*prev_iter);
success = child->commit_changes(task_manager, do_commit,
- depth + 1, last_depth,
+ depth + 1, last_depth,
child_error_msg,
needs_activate,
needs_update);
@@ -646,7 +646,7 @@ MasterConfigTreeNode::commit_changes(TaskManager& task_manager,
return success;
}
-bool
+bool
MasterConfigTreeNode::check_commit_status(string& error_msg) const
{
debug_msg("ConfigTreeNode::check_commit_status %s\n",
@@ -664,7 +664,7 @@ MasterConfigTreeNode::check_commit_status(string& error_msg) const
return false;
}
if (_deleted) {
- const BaseCommand* cmd
+ const BaseCommand* cmd
= _template_tree_node->const_command("%delete");
if (cmd != NULL) {
//
@@ -689,7 +689,7 @@ MasterConfigTreeNode::check_commit_status(string& error_msg) const
return result;
}
-void
+void
MasterConfigTreeNode::finalize_commit()
{
debug_msg("MasterConfigTreeNode::finalize_commit %s\n",
@@ -705,7 +705,7 @@ MasterConfigTreeNode::finalize_commit()
// previously committed (_value_committed == false)
//
XLOG_ASSERT(_existence_committed);
- XLOG_ASSERT(!_value_committed);
+ XLOG_ASSERT(!_value_committed);
delete_subtree_silently();
// No point in going further
return;
@@ -729,7 +729,7 @@ MasterConfigTreeNode::finalize_commit()
// careful the iterator stays valid.
//
list<ConfigTreeNode *>::iterator iter, prev_iter;
- iter = _children.begin();
+ iter = _children.begin();
while (iter != _children.end()) {
prev_iter = iter;
++iter;
diff --git a/xorp/rtrmgr/master_conf_tree_node.hh b/xorp/rtrmgr/master_conf_tree_node.hh
index b600fa5..0d37dc3 100644
--- a/xorp/rtrmgr/master_conf_tree_node.hh
+++ b/xorp/rtrmgr/master_conf_tree_node.hh
@@ -7,13 +7,13 @@
// 1991 as published by the Free Software Foundation. Redistribution
// and/or modification of this program under the terms of any other
// version of the GNU General Public License is not permitted.
-//
+//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
// see the GNU General Public License, Version 2, a copy of which can be
// found in the XORP LICENSE.gpl file.
-//
+//
// XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
// http://xorp.net
@@ -37,16 +37,16 @@ class MasterConfigTreeNode : public ConfigTreeNode {
public:
MasterConfigTreeNode(bool verbose);
MasterConfigTreeNode(const MasterConfigTreeNode& ctn);
- MasterConfigTreeNode(const string& node_name, const string& path,
- const TemplateTreeNode* ttn,
+ MasterConfigTreeNode(const string& node_name, const string& path,
+ const TemplateTreeNode* ttn,
MasterConfigTreeNode* parent,
const ConfigNodeId& node_id,
uid_t user_id, bool verbose);
- virtual ConfigTreeNode* create_node(const string& segment,
+ virtual ConfigTreeNode* create_node(const string& segment,
const string& path,
- const TemplateTreeNode* ttn,
- ConfigTreeNode* parent_node,
+ const TemplateTreeNode* ttn,
+ ConfigTreeNode* parent_node,
const ConfigNodeId& node_id,
uid_t user_id,
uint32_t clientid,
diff --git a/xorp/rtrmgr/module_command.cc b/xorp/rtrmgr/module_command.cc
index ef0bfd3..85eb2c7 100644
--- a/xorp/rtrmgr/module_command.cc
+++ b/xorp/rtrmgr/module_command.cc
@@ -7,13 +7,13 @@
// 1991 as published by the Free Software Foundation. Redistribution
// and/or modification of this program under the terms of any other
// version of the GNU General Public License is not permitted.
-//
+//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
// see the GNU General Public License, Version 2, a copy of which can be
// found in the XORP LICENSE.gpl file.
-//
+//
// XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
// http://xorp.net
--
1.7.5.4
More information about the Xorp-hackers
mailing list