summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-11-11 16:41:22 -0500
committerDan Winship <danw@gnome.org>2014-11-11 16:44:27 -0500
commitb27f87c714d6536f53c49cd8285ba5a110b48754 (patch)
tree68dd16d8cb4179c0eb5e45ead5f1c7894880ebe1
parent900763ce0f3613890ae265969d34163c3c8f43db (diff)
downloadNetworkManager-b27f87c714d6536f53c49cd8285ba5a110b48754.tar.gz
tui: fix generated new connection names
Now that "i" is being used in the first loop over all connections, we need to reset it before using it again in the loop to find an available name.
-rw-r--r--clients/tui/nm-editor-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/tui/nm-editor-utils.c b/clients/tui/nm-editor-utils.c
index a98278bc09..f936c95943 100644
--- a/clients/tui/nm-editor-utils.c
+++ b/clients/tui/nm-editor-utils.c
@@ -272,7 +272,7 @@ get_available_connection_name (const char *format,
}
/* Find the next available unique connection name */
- while (!cname && (i++ < 10000)) {
+ for (i = 1; !cname && i < 10000; i++) {
char *temp;
gboolean found = FALSE;