Skip to content
Snippets Groups Projects
Commit 603f214b authored by Stephan Bosch's avatar Stephan Bosch Committed by Timo Sirainen
Browse files

lib-sieve: sieve-storage - Use int for sieve_script_sequence_create() status result

parent 429a0ab1
No related branches found
No related tags found
No related merge requests found
...@@ -863,15 +863,15 @@ void sieve_script_sequence_init(struct sieve_script_sequence *sseq, ...@@ -863,15 +863,15 @@ void sieve_script_sequence_init(struct sieve_script_sequence *sseq,
sieve_storage_ref(storage); sieve_storage_ref(storage);
} }
struct sieve_script_sequence * int sieve_script_sequence_create(struct sieve_instance *svinst,
sieve_script_sequence_create(struct sieve_instance *svinst, const char *location,
const char *location, struct sieve_script_sequence **sseq_r,
enum sieve_error *error_code_r) enum sieve_error *error_code_r)
{ {
struct sieve_storage *storage; struct sieve_storage *storage;
struct sieve_script_sequence *sseq;
enum sieve_error error_code; enum sieve_error error_code;
*sseq_r = NULL;
if (error_code_r != NULL) if (error_code_r != NULL)
*error_code_r = SIEVE_ERROR_NONE; *error_code_r = SIEVE_ERROR_NONE;
else else
...@@ -879,12 +879,12 @@ sieve_script_sequence_create(struct sieve_instance *svinst, ...@@ -879,12 +879,12 @@ sieve_script_sequence_create(struct sieve_instance *svinst,
if (sieve_storage_create(svinst, location, 0, if (sieve_storage_create(svinst, location, 0,
&storage, error_code_r) < 0) &storage, error_code_r) < 0)
return NULL; return -1;
sseq = sieve_storage_get_script_sequence(storage, error_code_r); *sseq_r = sieve_storage_get_script_sequence(storage, error_code_r);
sieve_storage_unref(&storage); sieve_storage_unref(&storage);
return sseq; return 0;
} }
struct sieve_script * struct sieve_script *
......
...@@ -152,10 +152,10 @@ const char *sieve_script_get_last_error_lcase(struct sieve_script *script); ...@@ -152,10 +152,10 @@ const char *sieve_script_get_last_error_lcase(struct sieve_script *script);
struct sieve_script_sequence; struct sieve_script_sequence;
struct sieve_script_sequence * int sieve_script_sequence_create(struct sieve_instance *svinst,
sieve_script_sequence_create(struct sieve_instance *svinst, const char *location,
const char *location, struct sieve_script_sequence **sseq_r,
enum sieve_error *error_code_r); enum sieve_error *error_code_r);
struct sieve_script * struct sieve_script *
sieve_script_sequence_next(struct sieve_script_sequence *sseq, sieve_script_sequence_next(struct sieve_script_sequence *sseq,
enum sieve_error *error_code_r); enum sieve_error *error_code_r);
......
...@@ -289,8 +289,8 @@ lda_sieve_multiscript_get_scripts(struct sieve_instance *svinst, ...@@ -289,8 +289,8 @@ lda_sieve_multiscript_get_scripts(struct sieve_instance *svinst,
bool finished = FALSE; bool finished = FALSE;
int ret = 1; int ret = 1;
sseq = sieve_script_sequence_create(svinst, location, error_code_r); if (sieve_script_sequence_create(svinst, location,
if (sseq == NULL) &sseq, error_code_r) < 0)
return (*error_code_r == SIEVE_ERROR_NOT_FOUND ? 0 : -1); return (*error_code_r == SIEVE_ERROR_NOT_FOUND ? 0 : -1);
while (ret > 0 && !finished) { while (ret > 0 && !finished) {
......
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.