From b27f87c714d6536f53c49cd8285ba5a110b48754 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 11 Nov 2014 16:41:22 -0500 Subject: [PATCH] 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. --- clients/tui/nm-editor-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;