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
oai
openairinterface5G
Commits
75b827f8
Commit
75b827f8
authored
Mar 15, 2016
by
Cedric Roux
Browse files
don't accept spaces at end of lines in the messages' file
parent
6fa27370
Changes
1
Hide whitespace changes
Inline
Side-by-side
genids.c
View file @
75b827f8
...
...
@@ -135,6 +135,11 @@ int main(int n, char **v)
get_line
(
in
,
&
name
,
&
value
);
if
(
name
==
NULL
)
break
;
printf
(
"name '%s' value '%s'
\n
"
,
name
,
value
);
if
(
isspace
(
value
[
strlen
(
value
)
-
1
]))
{
printf
(
"bad value '%s' (no space at the end please!)
\n
"
,
value
);
unlink
(
out_name
);
exit
(
1
);
}
if
(
!
strcmp
(
name
,
"ID"
))
{
if
(
!
new_unique_id
(
value
))
{
unlink
(
out_name
);
exit
(
1
);
}
fprintf
(
out
,
"#define T_%s T_ID(%d)
\n
"
,
value
,
n
);
...
...
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