aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-19 13:48:08 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-19 13:48:08 +0100
commit37117c9d9884e2293373aea028e33eaaedf4b6a5 (patch)
tree98f1d680d313b3564766f7c111a0a0fb7d82f34c /src
parent784587e4fac2a805fdf86fa3aa2ebd0bfda76ddf (diff)
downloadrspamd-37117c9d9884e2293373aea028e33eaaedf4b6a5.tar.gz
rspamd-37117c9d9884e2293373aea028e33eaaedf4b6a5.zip
Fix strcmp return value checking.
Diffstat (limited to 'src')
-rw-r--r--src/libstat/backends/mmaped_file.c2
-rw-r--r--src/libstat/backends/sqlite3_backend.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstat/backends/mmaped_file.c b/src/libstat/backends/mmaped_file.c
index 6ee282b78..70452378f 100644
--- a/src/libstat/backends/mmaped_file.c
+++ b/src/libstat/backends/mmaped_file.c
@@ -844,7 +844,7 @@ rspamd_mmaped_file_init (struct rspamd_stat_ctx *ctx, struct rspamd_config *cfg)
* By default, all statfiles are treated as mmaped files
*/
if (stf->backend == NULL ||
- strcmp (stf->backend, MMAPED_BACKEND_TYPE)) {
+ strcmp (stf->backend, MMAPED_BACKEND_TYPE) == 0) {
/*
* Check configuration sanity
*/
diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c
index 4da7d9c41..43c52483f 100644
--- a/src/libstat/backends/sqlite3_backend.c
+++ b/src/libstat/backends/sqlite3_backend.c
@@ -302,7 +302,7 @@ rspamd_sqlite3_init (struct rspamd_stat_ctx *ctx,
while (curst) {
stf = curst->data;
- if (strcmp (stf->backend, SQLITE3_BACKEND_TYPE)) {
+ if (strcmp (stf->backend, SQLITE3_BACKEND_TYPE) == 0) {
/*
* Check configuration sanity
*/