[PATCH 1/2] vty: Replace 'enum node_type' by 'int' for last_node

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Tue Sep 10 07:07:31 UTC 2013


In this case the last_node variable may hold values that are not
in enum node_type, so int is used instead.
---
 src/vty/command.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vty/command.c b/src/vty/command.c
index df2ffea..7f76ced 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -2291,7 +2291,7 @@ gDEFUN(config_exit,
       config_end_cmd, "end", "End current mode and change to enable mode.")
 {
 	if (vty->node > ENABLE_NODE) {
-		enum node_type last_node = CONFIG_NODE;
+		int last_node = CONFIG_NODE;
 
 		/* Repeatedly call go_parent until a top node is reached. */
 		while (vty->node > CONFIG_NODE) {
-- 
1.7.9.5





More information about the OpenBSC mailing list