From cb57b48c86ab9e54bb73f7943ef333c6d1200ba8 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan.bosch@open-xchange.com> Date: Wed, 23 Jun 2021 02:10:09 +0200 Subject: [PATCH] plugins: sieve-extprograms: Reformat ext-filter.c --- src/plugins/sieve-extprograms/ext-filter.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/plugins/sieve-extprograms/ext-filter.c b/src/plugins/sieve-extprograms/ext-filter.c index af1f8f1cd..1a9efbbf6 100644 --- a/src/plugins/sieve-extprograms/ext-filter.c +++ b/src/plugins/sieve-extprograms/ext-filter.c @@ -30,9 +30,10 @@ static bool ext_filter_load(const struct sieve_extension *ext, void **context); static void ext_filter_unload(const struct sieve_extension *ext); -static bool ext_filter_validator_load - (const struct sieve_extension *ext, struct sieve_validator *valdtr); - +static bool +ext_filter_validator_load(const struct sieve_extension *ext, + struct sieve_validator *valdtr); + const struct sieve_extension_def sieve_ext_vnd_filter = { .name = "vnd.dovecot.filter", .load = ext_filter_load, @@ -47,7 +48,7 @@ const struct sieve_extension_def sieve_ext_vnd_filter = { static bool ext_filter_load(const struct sieve_extension *ext, void **context) { - if ( *context != NULL ) { + if (*context != NULL) { ext_filter_unload(ext); *context = NULL; } @@ -58,10 +59,11 @@ static bool ext_filter_load(const struct sieve_extension *ext, void **context) static void ext_filter_unload(const struct sieve_extension *ext) { - struct sieve_extprograms_config *ext_config = + struct sieve_extprograms_config *ext_config = (struct sieve_extprograms_config *)ext->context; - if ( ext_config == NULL ) return; + if (ext_config == NULL) + return; sieve_extprograms_config_deinit(&ext_config); } @@ -70,8 +72,9 @@ static void ext_filter_unload(const struct sieve_extension *ext) * Validation */ -static bool ext_filter_validator_load -(const struct sieve_extension *ext, struct sieve_validator *valdtr) +static bool +ext_filter_validator_load(const struct sieve_extension *ext, + struct sieve_validator *valdtr) { /* Register commands */ sieve_validator_register_command(valdtr, ext, &sieve_cmd_filter); -- GitLab