aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/plugins/uci/uci_parser.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-09-04 13:46:09 +0200
committerMartin Willi <martin@strongswan.org>2009-09-04 13:46:09 +0200
commit7daf5226b74e14a6e0f1a888b0be26f3d246f9f8 (patch)
tree6436de2e84e7a677ecfb83db4bf44766cc273d9f /src/charon/plugins/uci/uci_parser.c
parent7d1b0304467bc668b592ccd6680fd9615efbb5b2 (diff)
downloadstrongswan-7daf5226b74e14a6e0f1a888b0be26f3d246f9f8.tar.bz2
strongswan-7daf5226b74e14a6e0f1a888b0be26f3d246f9f8.tar.xz
removed trailing spaces ([[:space:]]+$)
Diffstat (limited to 'src/charon/plugins/uci/uci_parser.c')
-rw-r--r--src/charon/plugins/uci/uci_parser.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/charon/plugins/uci/uci_parser.c b/src/charon/plugins/uci/uci_parser.c
index f994e36f7..76019a3b4 100644
--- a/src/charon/plugins/uci/uci_parser.c
+++ b/src/charon/plugins/uci/uci_parser.c
@@ -32,7 +32,7 @@ struct private_uci_parser_t {
* Public part
*/
uci_parser_t public;
-
+
/**
* UCI package name this parser reads
*/
@@ -66,12 +66,12 @@ static bool section_enumerator_enumerate(section_enumerator_t *this, ...)
char **value;
va_list args;
int i;
-
+
if (&this->current->list == this->list)
{
return FALSE;
}
-
+
va_start(args, this);
value = va_arg(args, char**);
@@ -87,7 +87,7 @@ static bool section_enumerator_enumerate(section_enumerator_t *this, ...)
*value = uci_to_section(this->current)->type;
}
}
-
+
/* followed by keyword parameters */
for (i = 0; this->keywords[i]; i++)
{
@@ -99,7 +99,7 @@ static bool section_enumerator_enumerate(section_enumerator_t *this, ...)
}
}
va_end(args);
-
+
this->current = list_to_element(this->current->list.next);
return TRUE;
}
@@ -121,7 +121,7 @@ static enumerator_t* create_section_enumerator(private_uci_parser_t *this, ...)
section_enumerator_t *e;
va_list args;
int i;
-
+
/* allocate enumerator large enought to hold keyword pointers */
i = 1;
va_start(args, this);
@@ -133,16 +133,16 @@ static enumerator_t* create_section_enumerator(private_uci_parser_t *this, ...)
e = malloc(sizeof(section_enumerator_t) + sizeof(char*) * i);
i = 0;
va_start(args, this);
- do
+ do
{
e->keywords[i] = va_arg(args, char*);
}
while (e->keywords[i++]);
va_end(args);
-
+
e->public.enumerate = (void*)section_enumerator_enumerate;
e->public.destroy = (void*)section_enumerator_destroy;
-
+
/* load uci context */
e->ctx = uci_alloc_context();
if (uci_load(e->ctx, this->package, &e->package) != UCI_OK)
@@ -178,9 +178,9 @@ uci_parser_t *uci_parser_create(char *package)
this->public.create_section_enumerator = (enumerator_t*(*)(uci_parser_t*, ...))create_section_enumerator;
this->public.destroy = (void(*)(uci_parser_t*))destroy;
-
+
this->package = strdup(package);
-
+
return &this->public;
}