projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c01b130
)
liboconfig: Coding style changes.
author
Florian Forster
<octo@collectd.org>
Tue, 5 Dec 2017 15:58:29 +0000
(16:58 +0100)
committer
Florian Forster
<octo@collectd.org>
Tue, 5 Dec 2017 15:58:29 +0000
(16:58 +0100)
Mostly whitespace.
src/liboconfig/parser.y
patch
|
blob
|
history
diff --git
a/src/liboconfig/parser.y
b/src/liboconfig/parser.y
index
09e261f
..
90f51de
100644
(file)
--- a/
src/liboconfig/parser.y
+++ b/
src/liboconfig/parser.y
@@
-123,7
+123,7
@@
identifier:
option:
identifier argument_list EOL
{
option:
identifier argument_list EOL
{
- memset
(&$$, '\0', sizeof
($$));
+ memset
(&$$, 0, sizeof
($$));
$$.key = $1;
$$.values = $2.argument;
$$.values_num = $2.argument_num;
$$.key = $1;
$$.values = $2.argument;
$$.values_num = $2.argument_num;
@@
-133,13
+133,13
@@
option:
block_begin:
OPENBRAC identifier CLOSEBRAC EOL
{
block_begin:
OPENBRAC identifier CLOSEBRAC EOL
{
- memset
(&$$, '\0', sizeof
($$));
+ memset
(&$$, 0, sizeof
($$));
$$.key = $2;
}
|
OPENBRAC identifier argument_list CLOSEBRAC EOL
{
$$.key = $2;
}
|
OPENBRAC identifier argument_list CLOSEBRAC EOL
{
- memset
(&$$, '\0', sizeof
($$));
+ memset
(&$$, 0, sizeof
($$));
$$.key = $2;
$$.values = $3.argument;
$$.values_num = $3.argument_num;
$$.key = $2;
$$.values = $3.argument;
$$.values_num = $3.argument_num;
@@
-156,9
+156,9
@@
block_end:
block:
block_begin statement_list block_end
{
block:
block_begin statement_list block_end
{
- if (strcmp
($1.key, $3) != 0)
+ if (strcmp($1.key, $3) != 0)
{
{
- printf
("block_begin = %s; block_end = %s;\n", $1.key, $3);
+ printf("block_begin = %s; block_end = %s;\n", $1.key, $3);
yyerror("block not closed");
YYERROR;
}
yyerror("block not closed");
YYERROR;
}
@@
-169,9
+169,9
@@
block:
}
| block_begin block_end
{
}
| block_begin block_end
{
- if (strcmp
($1.key, $2) != 0)
+ if (strcmp($1.key, $2) != 0)
{
{
- printf
("block_begin = %s; block_end = %s;\n", $1.key, $2);
+ printf("block_begin = %s; block_end = %s;\n", $1.key, $2);
yyerror("block not closed");
YYERROR;
}
yyerror("block not closed");
YYERROR;
}
@@
-277,7
+277,7
@@
static char *unquote (const char *orig)
len -= 2;
memmove (ret, ret + 1, len);
len -= 2;
memmove (ret, ret + 1, len);
- ret[len] =
'\0'
;
+ ret[len] =
0
;
for (int i = 0; i < len; i++)
{
for (int i = 0; i < len; i++)
{