Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
ceaaff06
Commit
ceaaff06
authored
Feb 10, 2016
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass an explicit length to parse_config_from_string.
parent
fbb45a08
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
babeld.c
babeld.c
+1
-1
configuration.c
configuration.c
+2
-2
configuration.h
configuration.h
+1
-1
No files found.
babeld.c
View file @
ceaaff06
...
...
@@ -292,7 +292,7 @@ main(int argc, char **argv)
config_files
[
num_config_files
++
]
=
optarg
;
break
;
case
'C'
:
rc
=
parse_config_from_string
(
optarg
);
rc
=
parse_config_from_string
(
optarg
,
strlen
(
optarg
)
);
if
(
rc
<
0
)
{
fprintf
(
stderr
,
"Couldn't parse configuration from command line.
\n
"
);
...
...
configuration.c
View file @
ceaaff06
...
...
@@ -938,9 +938,9 @@ gnc_buf(struct buf_state *s)
}
int
parse_config_from_string
(
char
*
string
)
parse_config_from_string
(
char
*
string
,
int
n
)
{
struct
buf_state
s
=
{
string
,
0
,
strlen
(
string
)
};
struct
buf_state
s
=
{
string
,
0
,
n
};
return
parse_config
((
gnc_t
)
gnc_buf
,
&
s
);
}
...
...
configuration.h
View file @
ceaaff06
...
...
@@ -47,7 +47,7 @@ struct filter {
extern
struct
interface_conf
*
default_interface_conf
;
int
parse_config_from_file
(
const
char
*
filename
,
int
*
line_return
);
int
parse_config_from_string
(
char
*
string
);
int
parse_config_from_string
(
char
*
string
,
int
n
);
void
renumber_filters
(
void
);
int
input_filter
(
const
unsigned
char
*
id
,
...
...
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