Blame SOURCES/0003-hostname-helper-use-SSID_MAX_LEN.patch

57bc60
From 1f5267050e60f0902596810d97c16a4f5d5304c4 Mon Sep 17 00:00:00 2001
57bc60
From: Lubomir Rintel <lkundrak@v3.sk>
57bc60
Date: Wed, 2 Nov 2016 17:58:15 +0100
57bc60
Subject: [PATCH 3/3] hostname-helper: use SSID_MAX_LEN
57bc60
57bc60
It looks a bit weird to define it and still use the numeric literal.
57bc60
---
57bc60
 shell/hostname-helper.c | 6 +++---
57bc60
 1 file changed, 3 insertions(+), 3 deletions(-)
57bc60
57bc60
diff --git a/shell/hostname-helper.c b/shell/hostname-helper.c
57bc60
index 1a063b5cd..df596975e 100644
57bc60
--- a/shell/hostname-helper.c
57bc60
+++ b/shell/hostname-helper.c
57bc60
@@ -187,7 +187,7 @@ pretty_hostname_to_ssid (const char *pretty)
57bc60
 	if (pretty == NULL) {
57bc60
 		/* translators: This is the default hotspot name, need to be less than 32-bytes */
57bc60
 		ret = g_strdup (C_("hotspot", "Hotspot"));
57bc60
-		g_assert (strlen (ret) <= 32);
57bc60
+		g_assert (strlen (ret) <= SSID_MAX_LEN);
57bc60
 		return ret;
57bc60
 	}
57bc60
 
57bc60
@@ -199,11 +199,11 @@ pretty_hostname_to_ssid (const char *pretty)
57bc60
 		if (p == prev)
57bc60
 			break;
57bc60
 
57bc60
-		if (p - pretty > 32) {
57bc60
+		if (p - pretty > SSID_MAX_LEN) {
57bc60
 			ret = g_strndup (pretty, prev - pretty);
57bc60
 			break;
57bc60
 		}
57bc60
-		if (p - pretty == 32) {
57bc60
+		if (p - pretty == SSID_MAX_LEN) {
57bc60
 			ret = g_strndup (pretty, p - pretty);
57bc60
 			break;
57bc60
 		}
57bc60
-- 
57bc60
2.12.2
57bc60