From aabbbf243a1cfbc160ec684cd39e2f3a4a700d90 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 4 Oct 2018 09:37:26 +0200 Subject: device: fix a wrong comparison 'i <= G_MAXINT' is always true. --- src/devices/nm-device-ethernet-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/nm-device-ethernet-utils.c b/src/devices/nm-device-ethernet-utils.c index 8bdb19917..b18eadfa9 100644 --- a/src/devices/nm-device-ethernet-utils.c +++ b/src/devices/nm-device-ethernet-utils.c @@ -29,7 +29,7 @@ nm_device_ethernet_utils_get_default_wired_name (GHashTable *existing_ids) int i; /* Find the next available unique connection name */ - for (i = 1; i <= G_MAXINT; i++) { + for (i = 1; i < G_MAXINT; i++) { temp = g_strdup_printf (_("Wired connection %d"), i); if ( !existing_ids || !g_hash_table_contains (existing_ids, temp)) -- cgit v1.2.3