Commit da4a591b authored by Lubomir Rintel's avatar Lubomir Rintel

hostname-helper: use SSID_MAX_LEN

It looks a bit weird to define it and still use the numeric literal.
parent 239403c7
......@@ -187,7 +187,7 @@ pretty_hostname_to_ssid (const char *pretty)
if (pretty == NULL) {
/* translators: This is the default hotspot name, need to be less than 32-bytes */
ret = g_strdup (C_("hotspot", "Hotspot"));
g_assert (strlen (ret) <= 32);
g_assert (strlen (ret) <= SSID_MAX_LEN);
return ret;
}
......@@ -199,11 +199,11 @@ pretty_hostname_to_ssid (const char *pretty)
if (p == prev)
break;
if (p - pretty > 32) {
if (p - pretty > SSID_MAX_LEN) {
ret = g_strndup (pretty, prev - pretty);
break;
}
if (p - pretty == 32) {
if (p - pretty == SSID_MAX_LEN) {
ret = g_strndup (pretty, p - pretty);
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment