Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
3b59ec25
Commit
3b59ec25
authored
Jun 06, 2020
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
httpd: use ARRAY_SIZE()
parent
d8cc7df9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
src/network/httpd.c
src/network/httpd.c
+1
-2
No files found.
src/network/httpd.c
View file @
3b59ec25
...
...
@@ -1279,7 +1279,6 @@ msg_type[] =
{
"GET"
,
HTTPD_MSG_GET
,
HTTPD_PROTO_HTTP
},
{
"HEAD"
,
HTTPD_MSG_HEAD
,
HTTPD_PROTO_HTTP
},
{
"POST"
,
HTTPD_MSG_POST
,
HTTPD_PROTO_HTTP
},
{
""
,
HTTPD_MSG_NONE
,
HTTPD_PROTO_NONE
}
};
...
...
@@ -1423,7 +1422,7 @@ static void httpd_ClientRecv(httpd_client_t *cl)
p
=
NULL
;
cl
->
query
.
i_type
=
HTTPD_MSG_NONE
;
for
(
unsigned
i
=
0
;
msg_type
[
i
].
name
[
0
]
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
ARRAY_SIZE
(
msg_type
)
;
i
++
)
if
(
!
strncmp
((
char
*
)
cl
->
p_buffer
,
msg_type
[
i
].
name
,
strlen
(
msg_type
[
i
].
name
)))
{
p
=
(
char
*
)
&
cl
->
p_buffer
[
strlen
(
msg_type
[
i
].
name
)
+
1
];
...
...
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