Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Settings
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
677
Issues
677
List
Boards
Labels
Service Desk
Milestones
Merge Requests
53
Merge Requests
53
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
Settings
Commits
da4a591b
Commit
da4a591b
authored
Nov 02, 2016
by
Lubomir Rintel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hostname-helper: use SSID_MAX_LEN
It looks a bit weird to define it and still use the numeric literal.
parent
239403c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
shell/hostname-helper.c
shell/hostname-helper.c
+3
-3
No files found.
shell/hostname-helper.c
View file @
da4a591b
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment