Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marvin Scholz
Icecast-Server
Commits
c0e89540
Commit
c0e89540
authored
Nov 22, 2015
by
Philipp Schafft
🦁
Browse files
Cleanup: mark key as const (why wasn't it const already?)
parent
b55bae03
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/matchfile.c
View file @
c0e89540
...
...
@@ -144,7 +144,7 @@ int matchfile_release(matchfile_t *file) {
}
/* we are not const char *key because of avl_get_by_key()... */
int
matchfile_match
(
matchfile_t
*
file
,
char
*
key
)
{
int
matchfile_match
(
matchfile_t
*
file
,
const
char
*
key
)
{
void
*
result
;
if
(
!
file
)
...
...
@@ -159,7 +159,7 @@ int matchfile_match(matchfile_t *file, char *key) {
return
avl_get_by_key
(
file
->
contents
,
(
void
*
)
key
,
&
result
)
==
0
?
1
:
0
;
}
int
matchfile_match_allow_deny
(
matchfile_t
*
allow
,
matchfile_t
*
deny
,
char
*
key
)
{
int
matchfile_match_allow_deny
(
matchfile_t
*
allow
,
matchfile_t
*
deny
,
const
char
*
key
)
{
if
(
!
allow
&&
!
deny
)
return
1
;
...
...
src/matchfile.h
View file @
c0e89540
...
...
@@ -15,9 +15,9 @@ typedef struct matchfile_tag matchfile_t;
matchfile_t
*
matchfile_new
(
const
char
*
filename
);
int
matchfile_addref
(
matchfile_t
*
file
);
int
matchfile_release
(
matchfile_t
*
file
);
int
matchfile_match
(
matchfile_t
*
file
,
char
*
key
);
int
matchfile_match
(
matchfile_t
*
file
,
const
char
*
key
);
/* returns 1 for allow or pass and 0 for deny */
int
matchfile_match_allow_deny
(
matchfile_t
*
allow
,
matchfile_t
*
deny
,
char
*
key
);
int
matchfile_match_allow_deny
(
matchfile_t
*
allow
,
matchfile_t
*
deny
,
const
char
*
key
);
#endif
/* __MATCHFILE_H__ */
Write
Preview
Supports
Markdown
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