Skip to content

Commit

Permalink
fts-lucene: Do not clobber return value
Browse files Browse the repository at this point in the history
Found by scanbuild
  • Loading branch information
cmouse committed Nov 1, 2017
1 parent 2a550de commit 787bbd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/fts-lucene/fts-backend-lucene.c
Expand Up @@ -263,6 +263,7 @@ fts_backend_lucene_update_deinit(struct fts_backend_update_context *_ctx)
if (ctx->expunge_ctx != NULL) {
if (fts_expunge_log_append_commit(&ctx->expunge_ctx) < 0) {
struct stat st;
ret = -1;

if (stat(backend->dir_path, &st) < 0 && errno == ENOENT) {
/* lucene-indexes directory doesn't even exist,
Expand All @@ -271,7 +272,6 @@ fts_backend_lucene_update_deinit(struct fts_backend_update_context *_ctx)
(void)lucene_index_rescan(backend->index);
ret = 0;
}
ret = -1;
}
}

Expand Down

0 comments on commit 787bbd4

Please sign in to comment.