Skip to content
Snippets Groups Projects
Commit a010c390 authored by Stephan Bosch's avatar Stephan Bosch Committed by Stephan Bosch
Browse files

lib-sieve: The return type of duplicate_check() is supposed to be bool rather than int.

Found with clang -Wstrict-bool.
parent b0b9e0a5
No related branches found
No related tags found
No related merge requests found
...@@ -769,11 +769,11 @@ bool sieve_action_duplicate_check_available ...@@ -769,11 +769,11 @@ bool sieve_action_duplicate_check_available
return ( senv->duplicate_check != NULL && senv->duplicate_mark != NULL ); return ( senv->duplicate_check != NULL && senv->duplicate_mark != NULL );
} }
int sieve_action_duplicate_check bool sieve_action_duplicate_check
(const struct sieve_script_env *senv, const void *id, size_t id_size) (const struct sieve_script_env *senv, const void *id, size_t id_size)
{ {
if ( senv->duplicate_check == NULL || senv->duplicate_mark == NULL) if ( senv->duplicate_check == NULL || senv->duplicate_mark == NULL)
return 0; return FALSE;
return senv->duplicate_check(senv, id, id_size); return senv->duplicate_check(senv, id, id_size);
} }
......
...@@ -260,7 +260,7 @@ void sieve_act_store_get_storage_error ...@@ -260,7 +260,7 @@ void sieve_act_store_get_storage_error
bool sieve_action_duplicate_check_available bool sieve_action_duplicate_check_available
(const struct sieve_script_env *senv); (const struct sieve_script_env *senv);
int sieve_action_duplicate_check bool sieve_action_duplicate_check
(const struct sieve_script_env *senv, const void *id, size_t id_size); (const struct sieve_script_env *senv, const void *id, size_t id_size);
void sieve_action_duplicate_mark void sieve_action_duplicate_mark
(const struct sieve_script_env *senv, const void *id, size_t id_size, (const struct sieve_script_env *senv, const void *id, size_t id_size,
......
...@@ -210,7 +210,7 @@ struct sieve_script_env { ...@@ -210,7 +210,7 @@ struct sieve_script_env {
const char **error_r); const char **error_r);
/* Interface for marking and checking duplicates */ /* Interface for marking and checking duplicates */
int (*duplicate_check) bool (*duplicate_check)
(const struct sieve_script_env *senv, const void *id, size_t id_size); (const struct sieve_script_env *senv, const void *id, size_t id_size);
void (*duplicate_mark) void (*duplicate_mark)
(const struct sieve_script_env *senv, const void *id, size_t id_size, (const struct sieve_script_env *senv, const void *id, size_t id_size,
......
...@@ -187,7 +187,7 @@ static int imap_sieve_smtp_finish ...@@ -187,7 +187,7 @@ static int imap_sieve_smtp_finish
* Duplicate checking * Duplicate checking
*/ */
static int imap_sieve_duplicate_check static bool imap_sieve_duplicate_check
(const struct sieve_script_env *senv, const void *id, (const struct sieve_script_env *senv, const void *id,
size_t id_size) size_t id_size)
{ {
......
...@@ -120,7 +120,7 @@ static int lda_sieve_reject_mail ...@@ -120,7 +120,7 @@ static int lda_sieve_reject_mail
* Duplicate checking * Duplicate checking
*/ */
static int lda_sieve_duplicate_check static bool lda_sieve_duplicate_check
(const struct sieve_script_env *senv, const void *id, size_t id_size) (const struct sieve_script_env *senv, const void *id, size_t id_size)
{ {
struct mail_deliver_context *dctx = struct mail_deliver_context *dctx =
......
...@@ -100,7 +100,7 @@ static int sieve_smtp_finish ...@@ -100,7 +100,7 @@ static int sieve_smtp_finish
* Dummy duplicate check implementation * Dummy duplicate check implementation
*/ */
static int duplicate_check static bool duplicate_check
(const struct sieve_script_env *senv, const void *id ATTR_UNUSED, (const struct sieve_script_env *senv, const void *id ATTR_UNUSED,
size_t id_size ATTR_UNUSED) size_t id_size ATTR_UNUSED)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.