dovecot-2.2: Make static analyzer happier.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Oct 29 21:31:44 EET 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/3a40d29049b2
changeset: 15352:3a40d29049b2
user: Timo Sirainen <tss at iki.fi>
date: Mon Oct 29 21:31:39 2012 +0200
description:
Make static analyzer happier.
diffstat:
src/lib-dict/dict-file.c | 5 +++--
src/lib-index/mail-transaction-log.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r ce342fd3cae7 -r 3a40d29049b2 src/lib-dict/dict-file.c
--- a/src/lib-dict/dict-file.c Mon Oct 29 21:28:45 2012 +0200
+++ b/src/lib-dict/dict-file.c Mon Oct 29 21:31:39 2012 +0200
@@ -244,11 +244,12 @@
{
struct file_dict_iterate_context *ctx =
(struct file_dict_iterate_context *)_ctx;
- struct file_dict *dict = (struct file_dict *)_ctx->dict;
const struct file_dict_iterate_path *path;
char *key, *value;
- while (hash_table_iterate(ctx->iter, dict->hash, &key, &value)) {
+ while (hash_table_iterate(ctx->iter,
+ ((struct file_dict *)_ctx->dict)->hash,
+ &key, &value)) {
path = file_dict_iterate_find_path(ctx, key);
if (path == NULL)
continue;
diff -r ce342fd3cae7 -r 3a40d29049b2 src/lib-index/mail-transaction-log.c
--- a/src/lib-index/mail-transaction-log.c Mon Oct 29 21:28:45 2012 +0200
+++ b/src/lib-index/mail-transaction-log.c Mon Oct 29 21:31:39 2012 +0200
@@ -452,7 +452,8 @@
if (ret == 0 && log->head == file) {
/* success */
- lock_secs = log->head->lock_created - lock_wait_started;
+ i_assert(file != NULL);
+ lock_secs = file->lock_created - lock_wait_started;
break;
}
More information about the dovecot-cvs
mailing list